@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.mjs
CHANGED
|
@@ -338,9 +338,12 @@ function Emblem(props) {
|
|
|
338
338
|
return;
|
|
339
339
|
}
|
|
340
340
|
const el = ref.current;
|
|
341
|
-
const onLoad = () => setFailed(false);
|
|
342
|
-
el == null ? void 0 : el.addEventListener("iconload", onLoad);
|
|
343
341
|
const timer = setTimeout(() => setFailed(true), LOAD_TIMEOUT_MS);
|
|
342
|
+
const onLoad = () => {
|
|
343
|
+
setFailed(false);
|
|
344
|
+
clearTimeout(timer);
|
|
345
|
+
};
|
|
346
|
+
el == null ? void 0 : el.addEventListener("iconload", onLoad);
|
|
344
347
|
return () => {
|
|
345
348
|
el == null ? void 0 : el.removeEventListener("iconload", onLoad);
|
|
346
349
|
clearTimeout(timer);
|