File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ export function createMatcher (routes: Array<RouteConfig>): Matcher {
104
104
hash
105
105
} , undefined , location )
106
106
} else {
107
- warn ( `invalid redirect option: ${ JSON . stringify ( redirect ) } ` )
107
+ warn ( false , `invalid redirect option: ${ JSON . stringify ( redirect ) } ` )
108
108
return createRouteContext ( null , location )
109
109
}
110
110
}
@@ -174,7 +174,7 @@ function fillParams (
174
174
( regexpCompileCache [ path ] = Regexp . compile ( path ) )
175
175
return filler ( params || { } , { pretty : true } )
176
176
} catch ( e ) {
177
- assert ( `missing param for ${ routeMsg } : ${ e . message } ` )
177
+ assert ( false , `missing param for ${ routeMsg } : ${ e . message } ` )
178
178
return ''
179
179
}
180
180
}
Original file line number Diff line number Diff line change 1
- export function assert ( condition , message ) {
1
+ /* @flow */
2
+
3
+ export function assert ( condition : any , message : string ) {
2
4
if ( ! condition ) {
3
5
throw new Error ( `[vue-router] ${ message } ` )
4
6
}
5
7
}
6
8
7
- export function warn ( condition , message ) {
9
+ export function warn ( condition : any , message : string ) {
8
10
if ( ! condition ) {
9
11
typeof console !== 'undefined' && console . warn ( `[vue-router] ${ message } ` )
10
12
}
You can’t perform that action at this time.
0 commit comments