Skip to content

Commit

Permalink
Fix fallback isArrayBufferView implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechilds committed Apr 29, 2019
1 parent eea35d1 commit 4614928
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion support/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ function isArrayBufferView(value) {
return ArrayBuffer.isView(value);
}

return ObjectToString(value) === '[object ArrayBuffer]';
return (
isTypedArray(value) ||
isDataView(value)
);
}
exports.isArrayBufferView = isArrayBufferView;

Expand Down

0 comments on commit 4614928

Please sign in to comment.