File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -460,19 +460,20 @@ export class StateService {
460460 *
461461 * @returns {string } compiled state url
462462 */
463- href ( stateOrName : StateOrName , params ? : RawParams , options ?: HrefOptions ) : string {
463+ href ( stateOrName : StateOrName , params : RawParams , options ?: HrefOptions ) : string {
464464 let defaultHrefOpts = {
465465 lossy : true ,
466466 inherit : true ,
467467 absolute : false ,
468468 relative : this . $current
469469 } ;
470470 options = defaults ( options , defaultHrefOpts ) ;
471+ params = params || { } ;
471472
472473 let state = this . router . stateRegistry . matcher . find ( stateOrName , options . relative ) ;
473474
474475 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 ) ;
476477
477478 let nav = ( state && options . lossy ) ? state . navigable : state ;
478479
You can’t perform that action at this time.
0 commit comments