diff --git a/app/scripts/components/newsdesk.ts b/app/scripts/components/newsdesk.ts index ef25942ce..d33ce55a8 100644 --- a/app/scripts/components/newsdesk.ts +++ b/app/scripts/components/newsdesk.ts @@ -54,10 +54,10 @@ angular.module("korpApp").component("newsdesk", { $scope.expanded = !$scope.expanded } - $scope.$watch("expanded", updateItemsFiltered) - $scope.$watch("items", updateItemsFiltered) + $scope.$watch("expanded", $ctrl.updateItemsFiltered) + $scope.$watch("items", $ctrl.updateItemsFiltered) - function updateItemsFiltered() { + $ctrl.updateItemsFiltered = () => { $scope.itemsFiltered = $scope.items ? $scope.expanded ? [...$scope.items]