Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple calls to decorateIcons leaves icons empty #217

Open
andresbott opened this issue May 9, 2023 · 1 comment
Open

multiple calls to decorateIcons leaves icons empty #217

andresbott opened this issue May 9, 2023 · 1 comment

Comments

@andresbott
Copy link

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

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.

@bstopp
Copy link

bstopp commented Nov 1, 2023

I think this is no longer an issue given the change icons are handled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants