Skip to content

Commit

Permalink
refactor: use ifDefined directive for notification theme attribute (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan authored Dec 13, 2024
1 parent 849dc36 commit e5ffc28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/notification/src/vaadin-lit-notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/
import { css, html, LitElement } from 'lit';
import { ifDefined } from 'lit/directives/if-defined.js';
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
Expand Down Expand Up @@ -105,7 +106,7 @@ class Notification extends NotificationMixin(ElementMixin(ThemableMixin(PolylitM
render() {
return html`
<vaadin-notification-card
theme="${this._theme || ''}"
theme="${ifDefined(this._theme)}"
aria-live="${this.__computeAriaLive(this.assertive)}"
></vaadin-notification-card>
`;
Expand Down

0 comments on commit e5ffc28

Please # to comment.