mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 23:06:40 +00:00
Bit more robust icon loading
This commit is contained in:
parent
f29b1062b3
commit
33124030f6
@ -54,9 +54,12 @@ export default new Polymer({
|
|||||||
},
|
},
|
||||||
|
|
||||||
loadIcons() {
|
loadIcons() {
|
||||||
|
// If the import fails, we'll try to import again, must be a server glitch
|
||||||
|
// Since HTML imports only resolve once, we import another url.
|
||||||
|
const success = () => this.iconsLoaded = true;
|
||||||
this.importHref(`/static/mdi-${this.icons}.html`,
|
this.importHref(`/static/mdi-${this.icons}.html`,
|
||||||
() => this.iconsLoaded = true,
|
success,
|
||||||
() => this.loadIcons());
|
this.importHref(`/static/mdi.html`, success, success));
|
||||||
},
|
},
|
||||||
|
|
||||||
ready() {
|
ready() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user