zova-module-a-router 5.0.41 → 5.0.43

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,10 +1,13 @@
1
1
  {
2
2
  "name": "zova-module-a-router",
3
- "version": "5.0.41",
3
+ "version": "5.0.43",
4
4
  "title": "a-router",
5
5
  "zovaModule": {
6
6
  "capabilities": {
7
7
  "monkey": true
8
+ },
9
+ "dependencies": {
10
+ "a-model": "5.0.0"
8
11
  }
9
12
  },
10
13
  "type": "module",
@@ -37,5 +40,5 @@
37
40
  "dependencies": {
38
41
  "vue-router": "^4.3.2"
39
42
  },
40
- "gitHead": "6e879538e3d741f0c87136ad404eb0fe90c2bd7f"
43
+ "gitHead": "94b350996751d74cce48ecabbb0b9026d8c26e83"
41
44
  }
@@ -109,10 +109,14 @@ export class BeanRouter extends BeanBase {
109
109
  // donothing
110
110
  return;
111
111
  }
112
- const module = this.app.meta.module.get(moduleInfo.relativeName);
112
+ const moduleName = moduleInfo.relativeName;
113
+ // check if exists
114
+ if (!this.app.meta.module.exists(moduleName)) return '/404';
115
+ // check if loaded
116
+ const module = this.app.meta.module.get(moduleName, false);
113
117
  if (module) return;
114
118
  // use module
115
- await this.app.meta.module.use(fullPath);
119
+ await this.app.meta.module.use(moduleName);
116
120
  // redirect again
117
121
  return fullPath;
118
122
  });