From 1b515c83059a17e674d1b2f842690221a44b64df Mon Sep 17 00:00:00 2001 From: tsctx <91457664+tsctx@users.noreply.github.com> Date: Wed, 4 Dec 2024 12:13:52 +0000 Subject: [PATCH] fix mimetype parser wrong operator --- lib/web/fetch/data-url.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/web/fetch/data-url.js b/lib/web/fetch/data-url.js index c77747fc0d7..bc7a692a05a 100644 --- a/lib/web/fetch/data-url.js +++ b/lib/web/fetch/data-url.js @@ -283,7 +283,7 @@ function parseMIMEType (input) { // 5. If position is past the end of input, then return // failure - if (position.position > input.length) { + if (position.position >= input.length) { return 'failure' } @@ -364,7 +364,7 @@ function parseMIMEType (input) { } // 6. If position is past the end of input, then break. - if (position.position > input.length) { + if (position.position >= input.length) { break }