@buerokratt-ria/menu 0.1.13 → 0.1.14

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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  All changes to this project will be documented in this file.
4
4
 
5
+ ## [0.1.14] - 07-06-2024
6
+
7
+ - Fix a bug
8
+
5
9
  ## [0.1.13] - 07-06-2024
6
10
 
7
11
  - Fix a bug
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buerokratt-ria/menu",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Generic MainNavigation component that would be injected as dependency.",
5
5
  "main": "index.js",
6
6
  "scripts": {},
@@ -33,12 +33,14 @@ const useMenuItems = () => {
33
33
  let externals;
34
34
 
35
35
  try {
36
- externals = JSON.parse(externalMenuItems);
37
- if(!externals.isArray) {
38
- console.error('REACT_APP_MENU_JSON was ignored becuase it wasn\'t an array');
36
+ if(externalMenuItems) {
37
+ externals = JSON.parse(externalMenuItems);
38
+ if(!Array.isArray(externals)) {
39
+ console.warn('REACT_APP_MENU_JSON was ignored becuase it wasn\'t an array');
40
+ }
39
41
  }
40
42
  } catch (e) {
41
- console.error(e);
43
+ console.warn(e);
42
44
  }
43
45
 
44
46
  const allItems = externals ?? mainMenuItems ?? menuStructure ?? [];
Binary file