mobx-router-3
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -117,11 +117,24 @@ 'use strict'; | ||
currentQueryParams = (0, _mobx.toJS)(this.queryParams); | ||
beforeExitResult = rootViewChanged && this.currentView && this.currentView.beforeExit ? this.currentView.beforeExit(this.currentView, currentParams, store, currentQueryParams) : true; | ||
if (!(rootViewChanged && this.currentView && this.currentView.beforeExit)) { | ||
_context.next = 13; | ||
break; | ||
} | ||
_context.next = 10; | ||
return beforeExitResult; | ||
return this.currentView.beforeExit(this.currentView, currentParams, store, currentQueryParams); | ||
case 10: | ||
_context.t0 = _context.sent; | ||
_context.next = 14; | ||
break; | ||
if (!(_context.t0 === false)) { | ||
_context.next = 13; | ||
case 13: | ||
_context.t0 = true; | ||
case 14: | ||
beforeExitResult = _context.t0; | ||
if (!(beforeExitResult === false)) { | ||
_context.next = 17; | ||
break; | ||
@@ -132,12 +145,24 @@ } | ||
case 13: | ||
beforeEnterResult = rootViewChanged && view.beforeEnter ? view.beforeEnter(view, currentParams, store, currentQueryParams) : true; | ||
_context.next = 16; | ||
return beforeEnterResult; | ||
case 17: | ||
if (!(rootViewChanged && view.beforeEnter)) { | ||
_context.next = 23; | ||
break; | ||
} | ||
case 16: | ||
_context.next = 20; | ||
return view.beforeEnter(view, currentParams, store, currentQueryParams); | ||
case 20: | ||
_context.t1 = _context.sent; | ||
_context.next = 24; | ||
break; | ||
if (!(_context.t1 === false)) { | ||
_context.next = 19; | ||
case 23: | ||
_context.t1 = true; | ||
case 24: | ||
beforeEnterResult = _context.t1; | ||
if (!(beforeEnterResult === false)) { | ||
_context.next = 27; | ||
break; | ||
@@ -148,3 +173,3 @@ } | ||
case 19: | ||
case 27: | ||
@@ -163,3 +188,3 @@ rootViewChanged && this.currentView && this.currentView.onExit && this.currentView.onExit(this.currentView, currentParams, store, currentQueryParams); | ||
case 27: | ||
case 35: | ||
case 'end': | ||
@@ -166,0 +191,0 @@ return _context.stop(); |
{ | ||
"name": "mobx-router-3", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "A simple router for MobX", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -27,3 +27,3 @@ import { observable, computed, action, toJS } from 'mobx'; | ||
rootViewChanged && this.currentView && this.currentView.beforeExit | ||
? this.currentView.beforeExit( | ||
? (await this.currentView.beforeExit( | ||
this.currentView, | ||
@@ -33,5 +33,5 @@ currentParams, | ||
currentQueryParams | ||
) | ||
)) | ||
: true; | ||
if ((await beforeExitResult) === false) { | ||
if (beforeExitResult === false) { | ||
return; | ||
@@ -42,3 +42,3 @@ } | ||
rootViewChanged && view.beforeEnter | ||
? view.beforeEnter( | ||
? (await view.beforeEnter( | ||
view, | ||
@@ -48,5 +48,5 @@ currentParams, | ||
currentQueryParams | ||
) | ||
)) | ||
: true; | ||
if ((await beforeEnterResult) === false) { | ||
if (beforeEnterResult === false) { | ||
return; | ||
@@ -53,0 +53,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35565
682