mirror of
https://github.com/atisawd/boxicons.git
synced 2024-11-13 19:04:52 +01:00
Let element exist in DOM before grabbing attribute
Otherwise original code will initiate fallback process prematurely by attempting to grab the same icon in other logo types (which doesn't really make sense for logos anyway, but this should at least stop the prevailing issue).
This commit is contained in:
parent
9ffa9136e8
commit
aff3329e40
1 changed files with 3 additions and 1 deletions
|
@ -162,7 +162,6 @@ export class BoxIconElement extends HTMLElement {
|
||||||
}
|
}
|
||||||
this._state = {
|
this._state = {
|
||||||
$iconHolder: this.$ui.getElementById('icon'),
|
$iconHolder: this.$ui.getElementById('icon'),
|
||||||
type: this.getAttribute('type')
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,6 +210,9 @@ export class BoxIconElement extends HTMLElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
|
this._state = {
|
||||||
|
type: this.getAttribute('type')
|
||||||
|
};
|
||||||
if (usingShadyCss()) {
|
if (usingShadyCss()) {
|
||||||
GLOBAL.ShadyCSS.styleElement(this);
|
GLOBAL.ShadyCSS.styleElement(this);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue