@solidjs/router 0.12.3 → 0.12.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/data/cache.js +2 -2
- package/dist/index.js +1 -2
- package/package.json +1 -1
package/dist/data/cache.js
CHANGED
|
@@ -113,8 +113,8 @@ export function cache(fn, name) {
|
|
|
113
113
|
}
|
|
114
114
|
if (isServer) {
|
|
115
115
|
const e = getRequestEvent();
|
|
116
|
-
e && e.router.dataOnly
|
|
117
|
-
|
|
116
|
+
if (e && e.router.dataOnly)
|
|
117
|
+
return (e.router.data[key] = res);
|
|
118
118
|
}
|
|
119
119
|
if (intent !== "preload") {
|
|
120
120
|
res =
|
package/dist/index.js
CHANGED
|
@@ -945,8 +945,7 @@ function cache(fn, name) {
|
|
|
945
945
|
}
|
|
946
946
|
if (isServer) {
|
|
947
947
|
const e = getRequestEvent();
|
|
948
|
-
e && e.router.dataOnly
|
|
949
|
-
return res;
|
|
948
|
+
if (e && e.router.dataOnly) return e.router.data[key] = res;
|
|
950
949
|
}
|
|
951
950
|
if (intent !== "preload") {
|
|
952
951
|
res = "then" in res ? res.then(handleResponse(false), handleResponse(true)) : handleResponse(false)(res);
|