@next-core/brick-kit 2.132.0 → 2.132.1

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
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.132.1](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.132.0...@next-core/brick-kit@2.132.1) (2022-08-25)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * preview route render error ([ebd1041](https://github.com/easyops-cn/next-core/commit/ebd1041acbb69f3b323a118bfb140fc5ff0248b0))
12
+
13
+
14
+
15
+
16
+
6
17
  # [2.132.0](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.131.1...@next-core/brick-kit@2.132.0) (2022-08-25)
7
18
 
8
19
 
@@ -9272,15 +9272,19 @@
9272
9272
 
9273
9273
  _dev_only_updateStoryboardByRoute(appId, newRoute) {
9274
9274
  var storyboard = this.bootstrapData.storyboards.find(item => item.app.id === appId);
9275
+ var match = false;
9276
+
9277
+ var getKey = route => "".concat(route.path, ".").concat(route.exact);
9275
9278
 
9276
9279
  var replaceRoute = (routes, key) => {
9277
9280
  return routes.map(route => {
9278
- var routeKey = route.path;
9281
+ var routeKey = getKey(route);
9279
9282
 
9280
9283
  if (route.type === "routes") {
9281
9284
  route.routes = replaceRoute(route.routes, key);
9282
9285
  return route;
9283
9286
  } else if (routeKey === key) {
9287
+ match = true;
9284
9288
  return newRoute;
9285
9289
  } else {
9286
9290
  return route;
@@ -9288,7 +9292,11 @@
9288
9292
  });
9289
9293
  };
9290
9294
 
9291
- storyboard.routes = replaceRoute(storyboard.routes, newRoute.path);
9295
+ storyboard.routes = replaceRoute(storyboard.routes, getKey(newRoute));
9296
+
9297
+ if (!match) {
9298
+ storyboard.routes.unshift(newRoute);
9299
+ }
9292
9300
  }
9293
9301
 
9294
9302
  _dev_only_updateStoryboardByTemplate(appId, newTemplate, settings) {