@plasmicpkgs/plasmic-rich-components 1.0.108 → 1.0.109

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 CHANGED
@@ -940,9 +940,11 @@ function omitUndefined(x) {
940
940
  Object.entries(x).filter(([k, v]) => v !== void 0)
941
941
  );
942
942
  }
943
- function filterNavMenuItemsByConditions(navMenuItems) {
943
+ function processNavItems(navMenuItems) {
944
944
  return navMenuItems.filter((item) => item.condition === void 0 || item.condition).map((item) => __spreadProps$3(__spreadValues$5({}, item), {
945
- routes: item.routes ? filterNavMenuItemsByConditions(item.routes) : void 0
945
+ // We fill a default path because otherwise the item doesn't appear at all.
946
+ path: item.path || "/",
947
+ routes: item.routes ? processNavItems(item.routes) : void 0
946
948
  }));
947
949
  }
948
950
  const baseStyles = `
@@ -1070,7 +1072,7 @@ function RichLayout(_a) {
1070
1072
  splitMenus: layoutProps.layout === "mix",
1071
1073
  route: {
1072
1074
  path: rootUrl,
1073
- routes: navMenuItems ? filterNavMenuItemsByConditions(navMenuItems) : void 0
1075
+ routes: navMenuItems ? processNavItems(navMenuItems) : void 0
1074
1076
  },
1075
1077
  location: {
1076
1078
  pathname