diff --git a/src/box-icon-element.js b/src/box-icon-element.js index 6a38d2a..7017f83 100644 --- a/src/box-icon-element.js +++ b/src/box-icon-element.js @@ -162,7 +162,6 @@ export class BoxIconElement extends HTMLElement { } this._state = { $iconHolder: this.$ui.getElementById('icon'), - type: this.getAttribute('type') }; } @@ -211,6 +210,9 @@ export class BoxIconElement extends HTMLElement { } connectedCallback() { + this._state = { + type: this.getAttribute('type') + }; if (usingShadyCss()) { GLOBAL.ShadyCSS.styleElement(this); }