elbe-ui 1.0.3 → 1.0.4

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.
@@ -112,7 +112,18 @@ export function _makeBitProvider(context, bitP) {
112
112
  const ctrl = useMemo(() => _make(), [state]);
113
113
  useEffect(() => {
114
114
  ctrl.reload(true);
115
- }, []);
115
+ return () => {
116
+ const d = ctrl.dispose;
117
+ if (typeof d !== "function")
118
+ return;
119
+ try {
120
+ d();
121
+ }
122
+ catch (_a) {
123
+ // ignore errors during dispose
124
+ }
125
+ };
126
+ }, [ctrl]);
116
127
  // ========== DEFINE THE JSX ELEMENT ==========
117
128
  return _jsx(context.Provider, { value: ctrl, children: p.children });
118
129
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elbe-ui",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "author": "Robin Naumann",
5
5
  "license": "MIT",
6
6
  "repository": {