File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -460,19 +460,20 @@ export class StateService {
460
460
*
461
461
* @returns {string } compiled state url
462
462
*/
463
- href ( stateOrName : StateOrName , params ? : RawParams , options ?: HrefOptions ) : string {
463
+ href ( stateOrName : StateOrName , params : RawParams , options ?: HrefOptions ) : string {
464
464
let defaultHrefOpts = {
465
465
lossy : true ,
466
466
inherit : true ,
467
467
absolute : false ,
468
468
relative : this . $current
469
469
} ;
470
470
options = defaults ( options , defaultHrefOpts ) ;
471
+ params = params || { } ;
471
472
472
473
let state = this . router . stateRegistry . matcher . find ( stateOrName , options . relative ) ;
473
474
474
475
if ( ! isDefined ( state ) ) return null ;
475
- if ( options . inherit ) params = < any > this . params . $inherit ( params || { } , this . $current , state ) ;
476
+ if ( options . inherit ) params = < any > this . params . $inherit ( params , this . $current , state ) ;
476
477
477
478
let nav = ( state && options . lossy ) ? state . navigable : state ;
478
479
You can’t perform that action at this time.
0 commit comments