Skip to content

Commit 589f6d0

Browse files
committed
fix(index): better boolean logic
1 parent 39e57a4 commit 589f6d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ async function handleCorsRoute(req, env) {
8787
});
8888
// if not ok, or response is neither HTML or JSON, return 404
8989
if (!beresp.ok
90-
|| !beresp.headers.get('content-type').includes('html')
91-
|| !beresp.headers.get('content-type').includes('json')) {
90+
|| !(beresp.headers.get('content-type').includes('html')
91+
|| beresp.headers.get('content-type').includes('json'))) {
9292
return new Response('', {
9393
status: 404,
9494
headers: {

0 commit comments

Comments
 (0)