Skip to content

Commit 1ae59fc

Browse files
authored
fix infinite normalize loop (#1155)
1 parent 3d2e346 commit 1ae59fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/preview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export class PreviewServer {
172172

173173
// Normalize the pathname (e.g., dropping ".html").
174174
const normalizedPathname = config.md.normalizeLink(pathname);
175-
if (pathname !== normalizedPathname) {
175+
if (url.pathname !== normalizedPathname) {
176176
res.writeHead(302, {Location: normalizedPathname + url.search});
177177
res.end();
178178
return;

0 commit comments

Comments
 (0)