Skip to content

Commit 0d9fcc0

Browse files
authored
fix svelte-kit preview (#4205)
1 parent d34298e commit 0d9fcc0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/kit/src/core/preview/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ export async function preview({ port, host, config, https: use_https = false })
9999
location: normalized + search
100100
});
101101
res.end();
102+
return;
102103
}
103104

104105
// only treat this as a page if it doesn't include an extension
@@ -117,9 +118,9 @@ export async function preview({ port, host, config, https: use_https = false })
117118
fs.createReadStream(file).pipe(res);
118119
return;
119120
}
120-
} else {
121-
next();
122121
}
122+
123+
next();
123124
}),
124125

125126
// SSR

0 commit comments

Comments
 (0)