Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Fixed null-ref error when previewing colors for any theme but Skatepark#5014

Merged
pbking merged 1 commit into
trunkfrom
fix/color-preview
Nov 12, 2021
Merged

Fixed null-ref error when previewing colors for any theme but Skatepark#5014
pbking merged 1 commit into
trunkfrom
fix/color-preview

Conversation

@pbking
Copy link
Copy Markdown
Contributor

@pbking pbking commented Nov 10, 2021

The PR enabling Duotone customizations via the customizer seems to have introduced a null-ref error. It's checking for the existence of a global variable so I thought the original code was fine but Chrome was throwing an error and made color customization previews stop working.

To reproduce try to change the colors in Blockbase. Note the console error.

This change fixes that by referencing window. where the variable actually resides.

Copy link
Copy Markdown
Contributor

@MaggieCabrera MaggieCabrera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for fixing this!

@pbking pbking merged commit e463147 into trunk Nov 12, 2021
@scruffian scruffian deleted the fix/color-preview branch November 15, 2021 12:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blockbase: Color previews in customizer are broken

2 participants