From b9fd4f81135699df330153c5f386dbd18e8bbc34 Mon Sep 17 00:00:00 2001 From: Arild Matsson Date: Tue, 7 May 2024 11:21:35 +0200 Subject: [PATCH] Fix function ref in newsdesk --- app/scripts/components/newsdesk.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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]