@onehat/ui 0.3.205 → 0.3.206

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.3.205",
3
+ "version": "0.3.206",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -439,6 +439,21 @@ export default function withEditor(WrappedComponent, isTree = false) {
439
439
  }
440
440
  };
441
441
 
442
+ useEffect(() => {
443
+ if (!Repository) {
444
+ return () => {};
445
+ }
446
+
447
+ function handleError(msg) {
448
+ alert(msg);
449
+ }
450
+
451
+ Repository.on('error', handleError);
452
+ return () => {
453
+ Repository.off('error', handleError);
454
+ };
455
+ }, []);
456
+
442
457
  useEffect(() => {
443
458
  // When selection changes, set the mode appropriately
444
459
  let mode;