@sigmela/router 0.1.2 → 0.1.3

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.
@@ -322,6 +322,9 @@ export class Router {
322
322
  } = this.parsePath(path);
323
323
  const matched = this.matchRoute(pathname);
324
324
  if (!matched) {
325
+ if (__DEV__) {
326
+ throw new Error(`Route not found: "${pathname}"`);
327
+ }
325
328
  return;
326
329
  }
327
330
  if (matched.scope === 'tab' && this.tabBar && matched.tabIndex !== undefined) {
@@ -783,6 +786,9 @@ export class Router {
783
786
  } = this.parsePath(url);
784
787
  const deepest = this.matchRoute(pathname);
785
788
  if (!deepest) {
789
+ if (__DEV__) {
790
+ throw new Error(`Route not found: "${pathname}"`);
791
+ }
786
792
  this.seedInitialHistory();
787
793
  return;
788
794
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sigmela/router",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "React Native Router",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",