Adding null check for the properties getter.

This commit is contained in:
Matt Mo 2020-08-23 17:06:18 -07:00
parent 7c0dfd9f7f
commit c7529f1efc

View File

@ -36,6 +36,7 @@ class IgniteElement extends HTMLElement {
createProperties() {
var props = this.properties;
if (props != null) {
var keys = Object.keys(props);
for (var i = 0; i < keys.length; i++) {
let prop = new IgniteProperty(props[keys[i]]);
@ -58,6 +59,7 @@ class IgniteElement extends HTMLElement {
})(keys[i]);
}
}
}
/**
* Resets the properties for this element back to their original default
@ -66,11 +68,13 @@ class IgniteElement extends HTMLElement {
resetProperties() {
var props = this.properties;
if (props != null) {
var keys = Object.keys(props);
for (var i = 0; i < keys.length; i++) {
this[keys[i]] = props[keys[i]];
}
}
}
/**
* Setups this ignite element and constructs it's template when