@local-civics/mgmt-ui 0.1.219 → 0.1.220
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/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -358,9 +358,12 @@ function Emblem(props) {
|
|
|
358
358
|
return;
|
|
359
359
|
}
|
|
360
360
|
const el = ref.current;
|
|
361
|
-
const onLoad = () => setFailed(false);
|
|
362
|
-
el == null ? void 0 : el.addEventListener("iconload", onLoad);
|
|
363
361
|
const timer = setTimeout(() => setFailed(true), LOAD_TIMEOUT_MS);
|
|
362
|
+
const onLoad = () => {
|
|
363
|
+
setFailed(false);
|
|
364
|
+
clearTimeout(timer);
|
|
365
|
+
};
|
|
366
|
+
el == null ? void 0 : el.addEventListener("iconload", onLoad);
|
|
364
367
|
return () => {
|
|
365
368
|
el == null ? void 0 : el.removeEventListener("iconload", onLoad);
|
|
366
369
|
clearTimeout(timer);
|