gemi 0.17.2 → 0.17.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client/index.js
CHANGED
|
@@ -297,7 +297,7 @@ function useQuery(url, ...args) {
|
|
|
297
297
|
return resource.mutate.call(resource, variantKey, (data) => {
|
|
298
298
|
try {
|
|
299
299
|
if (typeof fn === "function") {
|
|
300
|
-
return fn(data);
|
|
300
|
+
return { ...data, ...fn(data) };
|
|
301
301
|
} else if (typeof fn === "string") {
|
|
302
302
|
const keys = fn.split(".");
|
|
303
303
|
let current = structuredClone(data);
|
|
@@ -312,9 +312,8 @@ function useQuery(url, ...args) {
|
|
|
312
312
|
}
|
|
313
313
|
current[keys[keys.length - 1]] = newValue;
|
|
314
314
|
return current;
|
|
315
|
-
} else {
|
|
316
|
-
return fn;
|
|
317
315
|
}
|
|
316
|
+
return { ...data, ...fn };
|
|
318
317
|
} catch (err) {
|
|
319
318
|
console.log(err);
|
|
320
319
|
}
|
|
@@ -32074,6 +32073,7 @@ function init(RootLayout, glob) {
|
|
|
32074
32073
|
clientExports.hydrateRoot(
|
|
32075
32074
|
document,
|
|
32076
32075
|
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32076
|
+
/* @__PURE__ */ jsx(Fragment, {}),
|
|
32077
32077
|
/* @__PURE__ */ jsx(Fragment, {}),
|
|
32078
32078
|
/* @__PURE__ */ jsx(ServerDataProvider, { children: /* @__PURE__ */ jsx(ClientRouter, { RootLayout }) })
|
|
32079
32079
|
] })
|