Skip to content

Commit

Permalink
fix mimetype parser wrong operator (#3924)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsctx authored Dec 5, 2024
1 parent c5dfb3d commit cac18e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/web/fetch/data-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}

Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit cac18e1

Please sign in to comment.