File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -1129,16 +1129,12 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
11291129 * @description
11301130 * Returns the state configuration object for any specific state or all states.
11311131 *
1132- * @param {string|object = } stateOrName (absolute or relative) If provided, will only get the config for
1132+ * @param {string|Sbject = } stateOrName (absolute or relative) If provided, will only get the config for
11331133 * the requested state. If not provided, returns an array of ALL state configs.
1134- * @returns {object|array } State configuration object or array of all objects.
1134+ * @returns {Object|Array } State configuration object or array of all objects.
11351135 */
11361136 $state . get = function ( stateOrName , context ) {
1137- if ( arguments . length === 0 ) {
1138- var list = [ ] ;
1139- forEach ( states , function ( state ) { list . push ( state . self ) ; } ) ;
1140- return list ;
1141- }
1137+ if ( arguments . length === 0 ) return objectKeys ( states ) . map ( function ( name ) { return states [ name ] . self ; } ) ;
11421138 var state = findState ( stateOrName , context ) ;
11431139 return ( state && state . self ) ? state . self : null ;
11441140 } ;
You can’t perform that action at this time.
0 commit comments