Skip to content

Commit c6d29fa

Browse files
committed
fixup! node/routes: Fix error handling
1 parent 701d9e3 commit c6d29fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node/routes/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export const register = async (
137137
// page (as opposed to an xhr request). Don't use `req.accepts()` since
138138
// *every* request that I've seen (in Firefox and Chromium at least)
139139
// includes `*/*` making it always truthy. Even for css/javascript.
140-
if (req.headers.accept && req.headers.accept.includes("text/html")) {
140+
if (req.headers.accept && req.headers.accept.includes("text/html")) {
141141
const resourcePath = path.resolve(rootPath, "src/browser/pages/error.html")
142142
res.set("Content-Type", getMediaMime(resourcePath))
143143
const content = await fs.readFile(resourcePath, "utf8")

0 commit comments

Comments
 (0)