From 124488cb8dba567037cf85aa8d90417545be80ab Mon Sep 17 00:00:00 2001 From: Garrett Darnell <12160067+garrettld@users.noreply.github.com> Date: Mon, 26 Aug 2024 10:30:41 -0400 Subject: [PATCH] fix(angular-virtual): fix proxying of computed functions with args Calls to 'getOffsetForAlignment', getOffsetForIndex', 'getVirtualItemForOffset', and 'indexFromElement' now work as expected instead of erroring with `TypeError: fn is not a function`. --- packages/angular-virtual/src/proxy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular-virtual/src/proxy.ts b/packages/angular-virtual/src/proxy.ts index abe4a10a..a6aadeb9 100644 --- a/packages/angular-virtual/src/proxy.ts +++ b/packages/angular-virtual/src/proxy.ts @@ -63,7 +63,7 @@ export function proxyVirtualizer< 'indexFromElement', ].includes(property) ) { - const fn = untypedTarget[property] as Function + const fn = virtualizer[property as keyof V] as Function Object.defineProperty(untypedTarget, property, { value: toComputed(virtualizerSignal, fn), configurable: true,