Skip to content

Commit

Permalink
fix: error when filename has a space
Browse files Browse the repository at this point in the history
  • Loading branch information
dityaaa authored Sep 2, 2024
1 parent 368f04b commit 5ca34b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export default async (config = {}) => {
}

try {
const filePath = templatePaths.find(t => t.endsWith(req.url.slice(1)))
const filePath = templatePaths.find(t => t.endsWith(decodeURI(req.url.slice(1))))

// Set the file being viewed
viewing = filePath
Expand Down

0 comments on commit 5ca34b5

Please sign in to comment.