Skip to content

Commit

Permalink
fix: check init.window not window
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag authored and crysmags committed Feb 27, 2024
1 parent a5588e1 commit 3104b15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/fetch/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class Request {
}

// 10. If init["window"] exists and is non-null, then throw a TypeError.
if (init.window !== undefined && window != null) {
if (init.window !== undefined && init.window != null) {
throw new TypeError(`'window' option '${window}' must be null`)
}

Expand Down
2 changes: 1 addition & 1 deletion test/fetch/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ test('arg validation', (t) => {
t.throws(() => {
// eslint-disable-next-line
new Request('http://asd', {
window: null
window: 1
})
}, TypeError)
t.throws(() => {
Expand Down

0 comments on commit 3104b15

Please sign in to comment.