@kolkrabbi/kol-icons 0.33.0 → 0.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Icon.jsx +5 -1
package/package.json
CHANGED
package/src/Icon.jsx
CHANGED
|
@@ -42,7 +42,11 @@ loadIcons()
|
|
|
42
42
|
const useIconsReady = () => {
|
|
43
43
|
const [ready, setReady] = useState(() => !!ICONS)
|
|
44
44
|
useEffect(() => {
|
|
45
|
-
|
|
45
|
+
/* the chunk can land BETWEEN the render (which read `ICONS` as null) and this effect — under a
|
|
46
|
+
Suspense boundary that gap is as long as the lazy route takes. Nobody was subscribed then, so
|
|
47
|
+
returning here without setting the state left the icon blank for good (kol-fxr's rail on
|
|
48
|
+
/editor and /randomiser, found in apps/editor-hub 2026-10-03). */
|
|
49
|
+
if (ICONS) { setReady(true); return undefined }
|
|
46
50
|
const cb = () => setReady(true)
|
|
47
51
|
subscribers.add(cb)
|
|
48
52
|
loadIcons()
|