Skip to content

Commit a6f8644

Browse files
deepview-autofixclaudeChALkeR
authored
fix(fetch): correct 'navigator' typo to 'navigate' in fetchFinale (#5044)
The condition in step 7 of fetchFinale checked `fetchParams.request.mode !== 'navigator'`, but 'navigator' is not a valid request mode — the spec value is 'navigate'. Because the typo never matched, the guarded block always ran, setting responseStatus and extracting the MIME type even for navigate-mode responses with cross-origin redirects, which the spec requires to be skipped. Signed-off-by: Nikita Skovoroda <chalkerx@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Nikita Skovoroda <chalkerx@gmail.com>
1 parent bc0a19c commit a6f8644

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/web/fetch/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ function fetchFinale (fetchParams, response) {
10251025
let responseStatus = 0
10261026

10271027
// 7. If fetchParams’s request’s mode is not "navigate" or response’s has-cross-origin-redirects is false:
1028-
if (fetchParams.request.mode !== 'navigator' || !response.hasCrossOriginRedirects) {
1028+
if (fetchParams.request.mode !== 'navigate' || !response.hasCrossOriginRedirects) {
10291029
// 1. Set responseStatus to response’s status.
10301030
responseStatus = response.status
10311031

0 commit comments

Comments
 (0)