File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed
Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -1043,29 +1043,20 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
10431043
10441044 $state . includes = function includes ( stateOrName , params ) {
10451045 if ( isString ( stateOrName ) && isGlob ( stateOrName ) ) {
1046- if ( doesStateMatchGlob ( stateOrName ) ) {
1047- stateOrName = $state . $current . name ;
1048- } else {
1046+ if ( ! doesStateMatchGlob ( stateOrName ) ) {
10491047 return false ;
10501048 }
1049+ stateOrName = $state . $current . name ;
10511050 }
1052-
10531051 var state = findState ( stateOrName ) ;
1052+
10541053 if ( ! isDefined ( state ) ) {
10551054 return undefined ;
10561055 }
1057-
10581056 if ( ! isDefined ( $state . $current . includes [ state . name ] ) ) {
10591057 return false ;
10601058 }
1061-
1062- var validParams = true ;
1063- angular . forEach ( params , function ( value , key ) {
1064- if ( ! isDefined ( $stateParams [ key ] ) || $stateParams [ key ] !== value ) {
1065- validParams = false ;
1066- }
1067- } ) ;
1068- return validParams ;
1059+ return equalForKeys ( params , $stateParams ) ;
10691060 } ;
10701061
10711062
You can’t perform that action at this time.
0 commit comments