vaderjs 1.3.3-alpha-30 → 1.3.3-alpha-32

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
@@ -2,7 +2,7 @@
2
2
  "name": "vaderjs",
3
3
  "description": "A Reactive library aimed to helping you build reactive applications inspired by react.js",
4
4
  "module": "vader.js",
5
- "version": "1.3.3-alpha-30",
5
+ "version": "1.3.3-alpha-32",
6
6
  "bin": {
7
7
  "vader": "./vader.js"
8
8
  },
package/runtime/router.js CHANGED
@@ -138,6 +138,10 @@ class VaderRouter{
138
138
  if (route.path === hash) {
139
139
  return true;
140
140
  }
141
+
142
+ if(hash === '' && route.path === '/'){
143
+ return true
144
+ }
141
145
 
142
146
  if (route.path.includes('*') || route.path.includes(':')) {
143
147
  const routeParts = route.path.split('/');
@@ -170,13 +174,14 @@ class VaderRouter{
170
174
  });
171
175
 
172
176
 
173
- if (!route) {
177
+ if (!route) {
174
178
  route = this.routes.find((errorRoute) => {
175
- if (errorRoute.path === '/404') {
179
+ console.log(errorRoute)
180
+ if (errorRoute.path.includes('/404')){
176
181
  this.error = true;
177
182
  return true;
178
- } else if (!this.error && errorRoute.path !== '/404') {
179
-
183
+ } else if (!this.error && errorRoute.path.includes('/404')){
184
+ window.location.hash = this.basePath
180
185
  }
181
186
  });
182
187