File tree 1 file changed +4
-13
lines changed
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) {
1043
1043
1044
1044
$state . includes = function includes ( stateOrName , params ) {
1045
1045
if ( isString ( stateOrName ) && isGlob ( stateOrName ) ) {
1046
- if ( doesStateMatchGlob ( stateOrName ) ) {
1047
- stateOrName = $state . $current . name ;
1048
- } else {
1046
+ if ( ! doesStateMatchGlob ( stateOrName ) ) {
1049
1047
return false ;
1050
1048
}
1049
+ stateOrName = $state . $current . name ;
1051
1050
}
1052
-
1053
1051
var state = findState ( stateOrName ) ;
1052
+
1054
1053
if ( ! isDefined ( state ) ) {
1055
1054
return undefined ;
1056
1055
}
1057
-
1058
1056
if ( ! isDefined ( $state . $current . includes [ state . name ] ) ) {
1059
1057
return false ;
1060
1058
}
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 ) ;
1069
1060
} ;
1070
1061
1071
1062
You can’t perform that action at this time.
0 commit comments