Skip to content

Commit ba984af

Browse files
committed
Fixes the state comparison. Contributed by Aleksandras Nelkinas (Cinamonas)
1 parent 0b99ad7 commit ba984af

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/viewDirective.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@ function $ViewDirective( $state, $compile, $controller, $injector, $an
7474

7575
// Nothing to do if previous locals is exactly the same as currert locals.
7676
if (locals === viewLocals || /* fast-check the obj references */
77-
(locals && viewLocals && /* deep-comparing essential elements */
78-
angular.equals(locals, viewLocals) &&
79-
angular.equals(locals.$stateParams, viewLocals.$stateParams)) ) return;
77+
(locals && viewLocals && /* deep-comparing essential elements */
78+
angular.equals(locals, viewLocals) &&
79+
angular.equals(locals.$$state, viewLocals.$$state) &&
80+
angular.equals(locals.$stateParams, viewLocals.$stateParams)) ) return;
8081

8182
// Preserving current view and scope if current $template is '='.
8283
if (locals && locals.$template === '=') return;

0 commit comments

Comments
 (0)