Skip to content
This repository was archived by the owner on May 24, 2022. It is now read-only.

Commit ed8276a

Browse files
committed
Correct detector
1 parent 20687d8 commit ed8276a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

buffer-to-arraybuffer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(function(root) {
2-
var isArrayBufferSupported = !!(new Buffer(0).buffer);
2+
var isArrayBufferSupported = (new Buffer(0)).buffer instanceof ArrayBuffer;
33

44
var bufferToArrayBuffer = isArrayBufferSupported ? bufferToArrayBufferSlice : bufferToArrayBufferCycle;
55

0 commit comments

Comments
 (0)