elliott/hydratable
Elliott Johnson 16 hours ago
parent caad89b888
commit 5af28fe91b

@ -30,7 +30,7 @@ export function hydratable(key, fn) {
} }
const val = /** @type {() => T} */ (store.get(key)); const val = /** @type {() => T} */ (store.get(key));
return val(); return val;
} }
/** @param {string} key */ /** @param {string} key */

@ -677,9 +677,8 @@ export class Renderer {
<script> <script>
{ {
const r = (v) => Promise.resolve(v); const r = (v) => Promise.resolve(v);
const w = (v) => () => v; const v = [${values.map((v) => `() => (${v})`).join(',')}];
const v = [${values.map((v) => `w(${v})`).join(',')}]; function d(i) { return v[i]() };
function d(i) { return v[i] };
const sv = window.__svelte ??= {};${Renderer.#used_hydratables(ctx.lookup)}${Renderer.#unused_hydratables(unused_keys)} const sv = window.__svelte ??= {};${Renderer.#used_hydratables(ctx.lookup)}${Renderer.#unused_hydratables(unused_keys)}
} }
</script>`; </script>`;

Loading…
Cancel
Save