buffer: correct indexOf() error message

PR-URL: https://github.com/nodejs/node/pull/29217
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
Brian White 2019-08-19 23:26:11 -04:00
parent bb1af6c82f
commit 5dc5cfba7d
No known key found for this signature in database
GPG key ID: 606D7358F94DA209
4 changed files with 4 additions and 3 deletions

View file

@ -907,7 +907,7 @@ function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
}
throw new ERR_INVALID_ARG_TYPE(
'value', ['string', 'Buffer', 'Uint8Array'], val
'value', ['number', 'string', 'Buffer', 'Uint8Array'], val
);
}