minor fixes

This commit is contained in:
OrJDev
2022-11-05 03:32:30 +02:00
parent f9b6a5cc11
commit d2999933c2
3 changed files with 10 additions and 20 deletions
+2 -9
View File
@@ -25,16 +25,9 @@ export function createSolidProxyDecoration<
if (lastArg === "useMutation") {
return (hooks as any)[lastArg](path, ...args);
}
const [input, ...rest] = args;
return (hooks as any)[lastArg](
() => getQueryKey(path, typeof input === "function" ? input() : input),
() => {
let p = {};
for (const r of rest) {
p = { ...p, ...(typeof r === "function" ? r() : r) };
}
return p;
}
() => getQueryKey(path, (args[0] as any)()),
args[1]
);
});
}