Open andresbott opened 1 year ago
When programatically calling decorateIcons() more than once during the initial rendering ( e.g. from a block js that is present more than once in a page) only the icon related to the first call will be printed, the rest of the icons will be replaced with: https://github.com/adobe/helix-project-boilerplate/blob/main/scripts/lib-franklin.js#L189
decorateIcons()
The current hypothesis it concurrent access to ICONS_CACHE, the first call sets the value to true in: https://github.com/adobe/helix-project-boilerplate/blob/main/scripts/lib-franklin.js#LL151C7-L151C18
and while the icon is loading for the first call to decorateIcons() , the second call to decorateIcons() does not evaluate https://github.com/adobe/helix-project-boilerplate/blob/main/scripts/lib-franklin.js#LL150C16-L150C16 but directly jumps to https://github.com/adobe/helix-project-boilerplate/blob/main/scripts/lib-franklin.js#L186.
I think this is no longer an issue given the change icons are handled.
When programatically calling
decorateIcons()
more than once during the initial rendering ( e.g. from a block js that is present more than once in a page) only the icon related to the first call will be printed, the rest of the icons will be replaced with: https://github.com/adobe/helix-project-boilerplate/blob/main/scripts/lib-franklin.js#L189The current hypothesis it concurrent access to ICONS_CACHE, the first call sets the value to true in: https://github.com/adobe/helix-project-boilerplate/blob/main/scripts/lib-franklin.js#LL151C7-L151C18
and while the icon is loading for the first call to
decorateIcons()
, the second call todecorateIcons()
does not evaluate https://github.com/adobe/helix-project-boilerplate/blob/main/scripts/lib-franklin.js#LL150C16-L150C16 but directly jumps to https://github.com/adobe/helix-project-boilerplate/blob/main/scripts/lib-franklin.js#L186.