mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-15 21:36:36 +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() {
|
||||
// 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.iconsLoaded = true,
|
||||
() => this.loadIcons());
|
||||
success,
|
||||
this.importHref(`/static/mdi.html`, success, success));
|
||||
},
|
||||
|
||||
ready() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user