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

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

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

Loading…
Cancel
Save