Avoid implicitly returning from a directive controller constructor function.

This commit is contained in:
Paulo Reis 2017-06-21 16:00:56 +01:00
parent ddee75e479
commit 33be384206

View file

@ -13,6 +13,7 @@ define [
@clearSelectAllState = () -> @clearSelectAllState = () ->
$scope.$broadcast "select-all:clear" $scope.$broadcast "select-all:clear"
return
] ]
link: (scope, element, attrs) -> link: (scope, element, attrs) ->
@ -63,6 +64,8 @@ define [
ignoreChanges = true ignoreChanges = true
scope.$apply () -> scope.$apply () ->
scope.ngModel = !scope.ngModel scope.ngModel = !scope.ngModel
if !scope.ngModel
selectAllListController.clearSelectAllState()
ignoreChanges = false ignoreChanges = false
} }