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 {
104104 hash
105105 } , undefined , location )
106106 } else {
107- warn ( `invalid redirect option: ${ JSON . stringify ( redirect ) } ` )
107+ warn ( false , `invalid redirect option: ${ JSON . stringify ( redirect ) } ` )
108108 return createRouteContext ( null , location )
109109 }
110110 }
@@ -174,7 +174,7 @@ function fillParams (
174174 ( regexpCompileCache [ path ] = Regexp . compile ( path ) )
175175 return filler ( params || { } , { pretty : true } )
176176 } catch ( e ) {
177- assert ( `missing param for ${ routeMsg } : ${ e . message } ` )
177+ assert ( false , `missing param for ${ routeMsg } : ${ e . message } ` )
178178 return ''
179179 }
180180}
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 ) {
24 if ( ! condition ) {
35 throw new Error ( `[vue-router] ${ message } ` )
46 }
57}
68
7- export function warn ( condition , message ) {
9+ export function warn ( condition : any , message : string ) {
810 if ( ! condition ) {
911 typeof console !== 'undefined' && console . warn ( `[vue-router] ${ message } ` )
1012 }
You can’t perform that action at this time.
0 commit comments