From e4d0575b47510d19f1fa78aab0bd99636c094388 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Wed, 2 Jul 2014 13:02:44 +0200 Subject: [PATCH] Fixing watchers in issue detail --- app/coffee/modules/issues/detail.coffee | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/coffee/modules/issues/detail.coffee b/app/coffee/modules/issues/detail.coffee index 108a4246..f5377157 100644 --- a/app/coffee/modules/issues/detail.coffee +++ b/app/coffee/modules/issues/detail.coffee @@ -210,10 +210,8 @@ WatchersDirective = ($rootscope, $confirm) -> link = ($scope, $el, $attrs, $model) -> editable = $attrs.editable? watcherIds = [] - $scope.$watch $attrs.ngModel, (val) -> - watcherIds = val - if watcherIds? - renderWatchers($scope, $el, watcherIds, editable) + $scope.$watch $attrs.ngModel, (watcherIds) -> + renderWatchers($scope, $el, watcherIds, editable) if not editable $el.find(".add-watcher").remove()