@solidjs/router 0.11.1 → 0.11.2

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.
@@ -82,11 +82,14 @@ export function cache(fn, name, options) {
82
82
  }
83
83
  return res;
84
84
  }
85
- let res = !isServer && sharedConfig.context && sharedConfig.load
85
+ let res = !isServer && sharedConfig.context && sharedConfig.has(key)
86
86
  ? sharedConfig.load(key) // hydrating
87
87
  : fn(...args);
88
88
  // serialize on server
89
- if (isServer && sharedConfig.context && !sharedConfig.context.noHydrate) {
89
+ if (isServer &&
90
+ sharedConfig.context &&
91
+ sharedConfig.context.async &&
92
+ !sharedConfig.context.noHydrate) {
90
93
  const e = getRequestEvent();
91
94
  (!e || !e.serverOnly) && sharedConfig.context.serialize(key, res);
92
95
  }
package/dist/index.js CHANGED
@@ -879,11 +879,11 @@ function cache(fn, name, options) {
879
879
  }
880
880
  return res;
881
881
  }
882
- let res = !isServer && sharedConfig.context && sharedConfig.load ? sharedConfig.load(key) // hydrating
882
+ let res = !isServer && sharedConfig.context && sharedConfig.has(key) ? sharedConfig.load(key) // hydrating
883
883
  : fn(...args);
884
884
 
885
885
  // serialize on server
886
- if (isServer && sharedConfig.context && !sharedConfig.context.noHydrate) {
886
+ if (isServer && sharedConfig.context && sharedConfig.context.async && !sharedConfig.context.noHydrate) {
887
887
  const e = getRequestEvent();
888
888
  (!e || !e.serverOnly) && sharedConfig.context.serialize(key, res);
889
889
  }
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "Ryan Turnquist"
7
7
  ],
8
8
  "license": "MIT",
9
- "version": "0.11.1",
9
+ "version": "0.11.2",
10
10
  "homepage": "https://github.com/solidjs/solid-router#readme",
11
11
  "repository": {
12
12
  "type": "git",