From 3e2e1caa4c37eedf6e569b5124c9e59f207bb92f Mon Sep 17 00:00:00 2001 From: Westbrook Johnson Date: Mon, 1 Jun 2020 09:12:49 -0400 Subject: [PATCH] fix(overlay): ensure undefined data is not passed into theme --- packages/overlay/src/active-overlay.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/overlay/src/active-overlay.ts b/packages/overlay/src/active-overlay.ts index 4a87cbdce9..cfbd48a674 100644 --- a/packages/overlay/src/active-overlay.ts +++ b/packages/overlay/src/active-overlay.ts @@ -25,6 +25,7 @@ import { property, PropertyValues, } from 'lit-element'; +import { ifDefined } from 'lit-html/directives/if-defined'; import styles from './active-overlay.css.js'; export interface PositionResult { @@ -401,10 +402,9 @@ export class ActiveOverlay extends LitElement { } public renderTheme(content: TemplateResult): TemplateResult { - const color = this.color as Color; - const scale = this.scale as Scale; + const { color, scale } = this; return html` - + ${content} `;