File tree Expand file tree Collapse file tree 4 files changed +18
-17
lines changed Expand file tree Collapse file tree 4 files changed +18
-17
lines changed Original file line number Diff line number Diff line change 27
27
},
28
28
"dependencies" : {
29
29
"react" : " 15.x.x" ,
30
- "router-async" : " 0.4 .x"
30
+ "router-async" : " 0.5 .x"
31
31
}
32
32
}
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export default class BrowserRouter extends Router {
26
26
} ;
27
27
}
28
28
async navigate ( path , ctx = new Context ( ) ) {
29
- const { redirect, error } = await this . router . match ( { path, ctx } ) ;
29
+ const { redirect, error } = await this . router . resolve ( { path, ctx } ) ;
30
30
if ( error === null ) {
31
31
if ( redirect ) {
32
32
this . history . push ( redirect ) ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import RootRoute from './root-route';
6
6
import Middleware from './middleware' ;
7
7
import Redirect from './redirect' ;
8
8
import Placeholder from './placeholder' ;
9
- import { RouterError , Context } from 'router-async' ;
9
+ import { Context , RouterError , DynamicRedirect } from 'router-async' ;
10
10
11
11
export {
12
12
BrowserRouter ,
@@ -17,6 +17,7 @@ export {
17
17
Middleware ,
18
18
Redirect ,
19
19
Placeholder ,
20
+ Context ,
20
21
RouterError ,
21
- Context
22
+ DynamicRedirect
22
23
} ;
Original file line number Diff line number Diff line change @@ -47,15 +47,15 @@ isomorphic-fetch@^2.1.1:
47
47
node-fetch "^1.0.1"
48
48
whatwg-fetch ">=0.10.0"
49
49
50
- js-tokens@^2 .0.0 :
51
- version "2 .0.0"
52
- resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-2 .0.0.tgz#79903f5563ee778cc1162e6dcf1a0027c97f9cb5 "
50
+ js-tokens@^3 .0.0 :
51
+ version "3 .0.0"
52
+ resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3 .0.0.tgz#a2f2a969caae142fb3cd56228358c89366957bd1 "
53
53
54
54
loose-envify@^1.0.0, loose-envify@^1.1.0 :
55
- version "1.3.0 "
56
- resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.0 .tgz#6b26248c42f6d4fa4b0d8542f78edfcde35642a8 "
55
+ version "1.3.1 "
56
+ resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1 .tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848 "
57
57
dependencies :
58
- js-tokens "^2 .0.0"
58
+ js-tokens "^3 .0.0"
59
59
60
60
node-fetch@^1.0.1 :
61
61
version "1.6.3"
@@ -65,8 +65,8 @@ node-fetch@^1.0.1:
65
65
is-stream "^1.0.1"
66
66
67
67
object-assign@^4.1.0 :
68
- version "4.1.0 "
69
- resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0 .tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0 "
68
+ version "4.1.1 "
69
+ resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1 .tgz#2109adc7965887cfc05cbbd442cac8bfbb360863 "
70
70
71
71
path-to-regexp@^1.6.0 :
72
72
version "1.7.0"
@@ -81,8 +81,8 @@ promise@^7.1.1:
81
81
asap "~2.0.3"
82
82
83
83
query-string@^4.2.3 :
84
- version "4.2.3 "
85
- resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.2.3. tgz#9f27273d207a25a8ee4c7b8c74dcd45d556db822 "
84
+ version "4.3.1 "
85
+ resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.1. tgz#54baada6713eafc92be75c47a731f2ebd09cd11d "
86
86
dependencies :
87
87
object-assign "^4.1.0"
88
88
strict-uri-encode "^1.0.0"
95
95
loose-envify "^1.1.0"
96
96
object-assign "^4.1.0"
97
97
98
- router-async@0.4 .x :
99
- version "0.4.1 "
100
- resolved "https://registry.yarnpkg.com/router-async/-/router-async-0.4.1 .tgz#f4a9403df1664544005f67961bde3e87b6802b82 "
98
+ router-async@0.5 .x :
99
+ version "0.5.2 "
100
+ resolved "https://registry.yarnpkg.com/router-async/-/router-async-0.5.2 .tgz#6b0c5448de137dfb425798a51d5d6ce7cc312161 "
101
101
dependencies :
102
102
path-to-regexp "^1.6.0"
103
103
query-string "^4.2.3"
You can’t perform that action at this time.
0 commit comments