From b761dcde4504dd02fc8fd54cc499da91efa7a56e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 15 Aug 2014 08:14:15 +0200 Subject: [PATCH] Switch from watch to watchCollection for bodyclass directive --- src/app/directives/bodyClass.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/directives/bodyClass.js b/src/app/directives/bodyClass.js index dc3e08053e9..6d3c6d32e15 100644 --- a/src/app/directives/bodyClass.js +++ b/src/app/directives/bodyClass.js @@ -15,7 +15,7 @@ function (angular, app, _) { var lastPulldownVal; var lastHideControlsVal; - $scope.$watch('dashboard.pulldowns', function() { + $scope.$watchCollection('dashboard.pulldowns', function() { if (!$scope.dashboard) { return; } @@ -26,7 +26,7 @@ function (angular, app, _) { elem.toggleClass('submenu-controls-visible', panelEnabled); lastPulldownVal = panelEnabled; } - }, true); + }); $scope.$watch('dashboard.hideControls', function() { if (!$scope.dashboard) { @@ -49,4 +49,4 @@ function (angular, app, _) { }; }); -}); \ No newline at end of file +});