Skip to content

Commit 67de744

Browse files
Kawacrepetargos
authored andcommitted
lib: replace ArrayBuffer.isView by primordial ArrayBuffer
PR-URL: #30692 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: David Carlier <[email protected]>
1 parent 79dd591 commit 67de744

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/string_decoder.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
'use strict';
2323

2424
const {
25+
ArrayBufferIsView,
2526
ObjectDefineProperties,
2627
} = primordials;
2728

@@ -74,7 +75,7 @@ function StringDecoder(encoding) {
7475
StringDecoder.prototype.write = function write(buf) {
7576
if (typeof buf === 'string')
7677
return buf;
77-
if (!ArrayBuffer.isView(buf))
78+
if (!ArrayBufferIsView(buf))
7879
throw new ERR_INVALID_ARG_TYPE('buf',
7980
['Buffer', 'TypedArray', 'DataView'],
8081
buf);

0 commit comments

Comments
 (0)