Skip to content

Commit

Permalink
read correct router option
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Jan 18, 2022
1 parent 28acd1f commit ceb555c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/kit/src/runtime/server/page/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export async function render_response({
resolve_opts,
stuff
}) {
const { hydrate, ssr } = resolve_opts;
const { hydrate, router, ssr } = resolve_opts;
const css = new Set(options.manifest._.entry.css);
const js = new Set(options.manifest._.entry.js);
/** @type {Map<string, string>} */
Expand Down Expand Up @@ -150,7 +150,7 @@ export async function render_response({
.map((dep) => `\n\t<link${styles.has(dep) ? ' disabled' : ''} rel="stylesheet" href="${options.prefix + dep}">`)
.join('');

if (resolve_opts.router || resolve_opts.hydrate) {
if (router || hydrate) {
head += Array.from(js)
.map((dep) => `\n\t<link rel="modulepreload" href="${options.prefix + dep}">`)
.join('');
Expand All @@ -164,7 +164,7 @@ export async function render_response({
session: ${try_serialize($session, (error) => {
throw new Error(`Failed to serialize session data: ${error.message}`);
})},
route: ${!!options.router},
route: ${!!router},
spa: ${!ssr},
trailing_slash: ${s(options.trailing_slash)},
hydrate: ${ssr && hydrate ? `{
Expand Down

0 comments on commit ceb555c

Please sign in to comment.