Comparing version 0.9.19 to 0.9.20
{ | ||
"name": "material", | ||
"version": "0.9.19", | ||
"version": "0.9.20", | ||
"description": "A lightweight implementation of Material Design Components for the web - ES6", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -17,5 +17,3 @@ import Component from './component' | ||
on (event, listener) { | ||
if (!this.events[event]) { | ||
this.events[event] = [] | ||
} | ||
this.events[event] ??= [] | ||
this.events[event].push(listener) | ||
@@ -27,5 +25,4 @@ | ||
emit (event, ...args) { | ||
if (this.events[event]) { | ||
this.events[event].forEach(listener => listener.apply(this, args)) | ||
} | ||
this.events?.[event]?.forEach(listener => listener.apply(this, args)) | ||
return this | ||
@@ -32,0 +29,0 @@ } |
@@ -101,3 +101,5 @@ import emitter from './module/emitter' | ||
setText (text) { | ||
this.text.innerHTML = text | ||
if (text) { | ||
this.text.innerHTML = text | ||
} | ||
} | ||
@@ -104,0 +106,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
499514
11950