@solidjs/router 0.10.7 → 0.10.8

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.
@@ -57,7 +57,7 @@ export function cache(fn, name, options) {
57
57
  const key = name + hashKey(args);
58
58
  let cached = cache.get(key);
59
59
  let version;
60
- if (owner) {
60
+ if (owner && !isServer) {
61
61
  version = createSignal(now, {
62
62
  equals: (p, v) => v - p < 50 // margin of error
63
63
  });
@@ -70,12 +70,12 @@ export function cache(fn, name, options) {
70
70
  cached[0] = now;
71
71
  }
72
72
  let res = cached[1];
73
- if (!isServer && intent !== "preload") {
73
+ if (intent !== "preload") {
74
74
  res =
75
75
  "then" in cached[1]
76
76
  ? cached[1].then(handleResponse(false), handleResponse(true))
77
77
  : handleResponse(false)(cached[1]);
78
- intent === "navigate" && startTransition(() => revalidateSignals(cached[3], cached[0])); // update version
78
+ !isServer && intent === "navigate" && startTransition(() => revalidateSignals(cached[3], cached[0])); // update version
79
79
  }
80
80
  return res;
81
81
  }
package/dist/index.js CHANGED
@@ -818,7 +818,7 @@ function cache(fn, name, options) {
818
818
  const key = name + hashKey(args);
819
819
  let cached = cache.get(key);
820
820
  let version;
821
- if (owner) {
821
+ if (owner && !isServer) {
822
822
  version = createSignal(now, {
823
823
  equals: (p, v) => v - p < 50 // margin of error
824
824
  });
@@ -833,9 +833,9 @@ function cache(fn, name, options) {
833
833
  cached[0] = now;
834
834
  }
835
835
  let res = cached[1];
836
- if (!isServer && intent !== "preload") {
836
+ if (intent !== "preload") {
837
837
  res = "then" in cached[1] ? cached[1].then(handleResponse(false), handleResponse(true)) : handleResponse(false)(cached[1]);
838
- intent === "navigate" && startTransition(() => revalidateSignals(cached[3], cached[0])); // update version
838
+ !isServer && intent === "navigate" && startTransition(() => revalidateSignals(cached[3], cached[0])); // update version
839
839
  }
840
840
 
841
841
  return res;
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "Ryan Turnquist"
7
7
  ],
8
8
  "license": "MIT",
9
- "version": "0.10.7",
9
+ "version": "0.10.8",
10
10
  "homepage": "https://github.com/solidjs/solid-router#readme",
11
11
  "repository": {
12
12
  "type": "git",