[BUGFIX] Avoid race condition in JS Icon API