Skip to content

Commit e5ffc28

Browse files
authored
refactor: use ifDefined directive for notification theme attribute (#8337)
1 parent 849dc36 commit e5ffc28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/notification/src/vaadin-lit-notification.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
55
*/
66
import { css, html, LitElement } from 'lit';
7+
import { ifDefined } from 'lit/directives/if-defined.js';
78
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
89
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
910
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
@@ -105,7 +106,7 @@ class Notification extends NotificationMixin(ElementMixin(ThemableMixin(PolylitM
105106
render() {
106107
return html`
107108
<vaadin-notification-card
108-
theme="${this._theme || ''}"
109+
theme="${ifDefined(this._theme)}"
109110
aria-live="${this.__computeAriaLive(this.assertive)}"
110111
></vaadin-notification-card>
111112
`;

0 commit comments

Comments
 (0)