fix opts are not being passed
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
"description": "SolidJS tRPC",
|
"description": "SolidJS tRPC",
|
||||||
"author": "OrJDev",
|
"author": "OrJDev",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "0.0.4-rc.1",
|
"version": "0.0.5-rc.1",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public",
|
"access": "public",
|
||||||
"tag": "next"
|
"tag": "next"
|
||||||
|
|||||||
@@ -28,7 +28,13 @@ export function createSolidProxyDecoration<
|
|||||||
const [input, ...rest] = args;
|
const [input, ...rest] = args;
|
||||||
return (hooks as any)[lastArg](
|
return (hooks as any)[lastArg](
|
||||||
() => getQueryKey(path, typeof input === "function" ? input() : input),
|
() => getQueryKey(path, typeof input === "function" ? input() : input),
|
||||||
() => rest.map((arg) => (typeof arg === "function" ? arg() : arg))
|
() => {
|
||||||
|
let p = {};
|
||||||
|
for (const r of rest) {
|
||||||
|
p = { ...p, ...(typeof r === "function" ? r() : r) };
|
||||||
|
}
|
||||||
|
return p;
|
||||||
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user