vaderjs 1.3.3-alpha-29 → 1.3.3-alpha-31
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 +1 -1
- package/runtime/router.js +9 -5
package/package.json
CHANGED
package/runtime/router.js
CHANGED
|
@@ -102,7 +102,10 @@ class VaderRouter{
|
|
|
102
102
|
const paramName = part.slice(1);
|
|
103
103
|
params[paramName] = hashParts[index];
|
|
104
104
|
}else if(part.startsWith('*')){
|
|
105
|
-
|
|
105
|
+
let array = hashParts.slice(index)
|
|
106
|
+
array.forEach((i, index)=>{
|
|
107
|
+
params[index] = i
|
|
108
|
+
})
|
|
106
109
|
}
|
|
107
110
|
});
|
|
108
111
|
return params;
|
|
@@ -167,13 +170,14 @@ class VaderRouter{
|
|
|
167
170
|
});
|
|
168
171
|
|
|
169
172
|
|
|
170
|
-
if (!route) {
|
|
173
|
+
if (!route) {
|
|
171
174
|
route = this.routes.find((errorRoute) => {
|
|
172
|
-
|
|
175
|
+
console.log(errorRoute)
|
|
176
|
+
if (errorRoute.path.includes('/404')){
|
|
173
177
|
this.error = true;
|
|
174
178
|
return true;
|
|
175
|
-
} else if (!this.error && errorRoute.path
|
|
176
|
-
|
|
179
|
+
} else if (!this.error && errorRoute.path.includes('/404')){
|
|
180
|
+
window.location.hash = this.basePath
|
|
177
181
|
}
|
|
178
182
|
});
|
|
179
183
|
|