-
Notifications
You must be signed in to change notification settings - Fork 33
Large post-registration imports can lead to incomplete icon maps #66
Comments
I am also getting this issue. The referenced PR does fix it but I'm not sure it is the best fix. UPDATE: Seems related to the use of |
|
I experienced the same problem and messed around to find solutions. Is it possible that replacing the If I'm right here this would maybe be a more elegant fix than working with the |
Note that I have encountered this problem with a small iconset only containing 4 simple svg icons (using Chrome 69) - so the problem is not limited to large imports it would seem. |
We fixed this by extending the original class and patching the fix in: https://github.com/home-assistant/home-assistant-polymer/blob/master/src/components/ha-iconset-svg.js |
Description
When importing a large HTML bundle, Chrome can parse it in pieces. If an iron-iconset-svg definition is broken across multiple pieces, then only the icons in the first piece (the one with the opening tag) are available in the icon map. Other icons will be blank.
Expected outcome
The icon map should be complete. Either wait until the closing tag or incrementally build the icon map.
Actual outcome
The icon map is incomplete, containing only the icons in the same piece of HTML that has the opening tag. Note this doesn't happen if you HTML import first, then register because HTML imports should block.
Live Demo
Steps to reproduce
Browsers Affected
This was detected in Chrome. I haven't tried in other browsers.
The text was updated successfully, but these errors were encountered: