Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/internal/encoding.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,7 +31,7 @@ const {
} = require('internal/util');

const {
isArrayBuffer,
isAnyArrayBuffer,
isArrayBufferView,
isUint8Array
} = require('internal/util/types');
Expand DownExpand Up@@ -404,7 +404,7 @@ function makeTextDecoderICU() {

decode(input = empty, options = {}) {
validateDecoder(this);
if (isArrayBuffer(input)) {
if (isAnyArrayBuffer(input)) {
input = lazyBuffer().from(input);
} else if (!isArrayBufferView(input)) {
throw new ERR_INVALID_ARG_TYPE('input',
Expand DownExpand Up@@ -469,7 +469,7 @@ function makeTextDecoderJS() {

decode(input = empty, options = {}) {
validateDecoder(this);
if (isArrayBuffer(input)) {
if (isAnyArrayBuffer(input)) {
input = lazyBuffer().from(input);
} else if (isArrayBufferView(input)) {
input = lazyBuffer().from(input.buffer, input.byteOffset,
Expand Down