@webtypen/webframez-core 0.0.49 → 0.0.52
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/lib/Router/Router.js +3 -0
- package/package.json +1 -1
- package/src/Router/Router.ts +4 -1
package/lib/Router/Router.js
CHANGED
|
@@ -397,6 +397,9 @@ class RouterFacade {
|
|
|
397
397
|
}
|
|
398
398
|
// Set Controller method as route-component
|
|
399
399
|
const controllerInstance = new controller();
|
|
400
|
+
if (!controllerInstance || !split || !split[1] || !controllerInstance[split[1]]) {
|
|
401
|
+
throw new Error("controllerInstance " + split[1] + " not found ...");
|
|
402
|
+
}
|
|
400
403
|
route.component = controllerInstance[split[1]].bind(controllerInstance);
|
|
401
404
|
}
|
|
402
405
|
if (route && route.component !== undefined) {
|
package/package.json
CHANGED
package/src/Router/Router.ts
CHANGED
|
@@ -467,9 +467,12 @@ class RouterFacade {
|
|
|
467
467
|
|
|
468
468
|
return;
|
|
469
469
|
}
|
|
470
|
-
|
|
470
|
+
|
|
471
471
|
// Set Controller method as route-component
|
|
472
472
|
const controllerInstance = new controller();
|
|
473
|
+
if (!controllerInstance || !split || !split[1] || !controllerInstance[split[1]]) {
|
|
474
|
+
throw new Error("controllerInstance " + split[1] + " not found ...");
|
|
475
|
+
}
|
|
473
476
|
route.component = controllerInstance[split[1]].bind(controllerInstance);
|
|
474
477
|
}
|
|
475
478
|
|