Skip to content

Commit cac18e1

Browse files
authored
fix mimetype parser wrong operator (#3924)
1 parent c5dfb3d commit cac18e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/web/fetch/data-url.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ function parseMIMEType (input) {
283283

284284
// 5. If position is past the end of input, then return
285285
// failure
286-
if (position.position > input.length) {
286+
if (position.position >= input.length) {
287287
return 'failure'
288288
}
289289

@@ -364,7 +364,7 @@ function parseMIMEType (input) {
364364
}
365365

366366
// 6. If position is past the end of input, then break.
367-
if (position.position > input.length) {
367+
if (position.position >= input.length) {
368368
break
369369
}
370370

0 commit comments

Comments
 (0)