zova-module-a-router 5.0.34 → 5.0.36

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": "zova-module-a-router",
3
- "version": "5.0.34",
3
+ "version": "5.0.36",
4
4
  "title": "a-router",
5
5
  "zovaModule": {
6
6
  "capabilities": {
@@ -37,5 +37,5 @@
37
37
  "dependencies": {
38
38
  "vue-router": "^4.3.2"
39
39
  },
40
- "gitHead": "0e66695a8571a9e0b6a2422a4235f2e9b10166e2"
40
+ "gitHead": "af3709403d01c849fb683c232e96a3bc4b62011c"
41
41
  }
@@ -64,6 +64,13 @@ export class StoreRouter extends BeanBase {
64
64
  });
65
65
  }
66
66
 
67
+ public checkPathValid(path?: string): boolean {
68
+ if (!path) return false;
69
+ const moduleInfo = ModuleInfo.parseInfo(path);
70
+ if (!moduleInfo) return true;
71
+ return this.app.meta.module.exists(moduleInfo.relativeName);
72
+ }
73
+
67
74
  private _resolveNameOrPath(query, fn) {
68
75
  const query1 = {};
69
76
  const query2: any = [];
package/src/monkey.ts CHANGED
@@ -65,8 +65,12 @@ export class Monkey extends BeanSimple implements IMonkeySystem, IMonkeyModule,
65
65
  const route = controllerData.context.route;
66
66
  const schemaKey = String(route.name || route.path);
67
67
  let schemas: TypePageSchema | undefined;
68
- const moduleName = ModuleInfo.parseName(schemaKey)!;
69
- const module = this.app.meta.module.get(moduleName)!;
68
+ const moduleInfo = ModuleInfo.parseInfo(ModuleInfo.parseName(schemaKey));
69
+ if (!moduleInfo) {
70
+ // do nothing
71
+ return;
72
+ }
73
+ const module = this.app.meta.module.get(moduleInfo.relativeName)!;
70
74
  if (route.name) {
71
75
  schemas = module.resource.pageNameSchemas?.[schemaKey];
72
76
  } else {