Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 67de744

Browse filesBrowse files
Kawacrepetargos
authored andcommitted
lib: replace ArrayBuffer.isView by primordial ArrayBuffer
PR-URL: #30692 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
1 parent 79dd591 commit 67de744
Copy full SHA for 67de744

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Collapse file

‎lib/string_decoder.js‎

Copy file name to clipboardExpand all lines: lib/string_decoder.js
+2-1Lines changed: 2 additions & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.