Skip to content

Commit f79ac33

Browse files
gaurishhsrichardlau
authored andcommitted
util: pass invalidSubtypeIndex instead of trimmedSubtype to error
PR-URL: #51264 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
1 parent cab7737 commit f79ac33

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/internal/mime.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function parseTypeAndSubtype(str) {
7070
constinvalidSubtypeIndex=SafeStringPrototypeSearch(trimmedSubtype,
7171
NOT_HTTP_TOKEN_CODE_POINT);
7272
if(trimmedSubtype===''||invalidSubtypeIndex!==-1){
73-
thrownewERR_INVALID_MIME_SYNTAX('subtype',str,trimmedSubtype);
73+
thrownewERR_INVALID_MIME_SYNTAX('subtype',str,invalidSubtypeIndex);
7474
}
7575
constsubtype=toASCIILower(trimmedSubtype);
7676
return[

0 commit comments

Comments
 (0)