Skip to content

Commit

Permalink
Fix function ref in newsdesk
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed May 7, 2024
1 parent ac23b16 commit b9fd4f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/scripts/components/newsdesk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit b9fd4f8

Please sign in to comment.