Skip to content

Commit

Permalink
[twisty] Add guard against uninitializer wrapper in background setter.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarron committed Aug 16, 2020
1 parent 6ee7077 commit b0ed176
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/twisty/dom/TwistyPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ export class TwistyPlayer extends ManagedCustomElement {

set background(background: BackgroundTheme) {
this.#config.attributes["background"].setValue(background);
this.#viewerWrapper.checkered = background === "checkered";
if (this.#viewerWrapper) {
this.#viewerWrapper.checkered = background === "checkered";
}
}

get background(): BackgroundTheme {
Expand Down

0 comments on commit b0ed176

Please sign in to comment.