From 88617078223e38bb854de14cd7be2dfefbc3fd67 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Wed, 25 Dec 2024 11:13:29 -0600 Subject: [PATCH] Don't convert functions with parameters --- src/util/computed.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/computed.ts b/src/util/computed.ts index 56051cd..29f0c8f 100644 --- a/src/util/computed.ts +++ b/src/util/computed.ts @@ -5,7 +5,7 @@ import { computed } from "vue"; export type MaybeGetter = T | (() => T); export function processGetter(obj: T): T extends () => infer S ? ComputedRef : T { - if (isFunction(obj)) { + if (isFunction(obj) && obj.length === 0) { return computed(obj) as ReturnType>; } return obj as ReturnType>;