From cac18e12a794800c6405ed633006cff44ca6f664 Mon Sep 17 00:00:00 2001 From: tsctx <91457664+tsctx@users.noreply.github.com> Date: Thu, 5 Dec 2024 23:15:45 +0000 Subject: [PATCH] fix mimetype parser wrong operator (#3924) --- 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 }