Skip to content

Commit 24df3cd

Browse files
committed
Checks that ArrayBuffer exists when doing a hash operation within the browser.
Reference #871
1 parent 1625210 commit 24df3cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ var util = {
469469
var sliceFn = util.arraySliceFn(data);
470470
var isBuffer = Buffer.isBuffer(data);
471471
//Identifying objects with an ArrayBuffer as buffers
472-
if (util.isBrowser() && data && data.buffer instanceof ArrayBuffer) isBuffer = true;
472+
if (util.isBrowser() && ArrayBuffer && data && data.buffer instanceof ArrayBuffer) isBuffer = true;
473473

474474
if (callback && typeof data === 'object' &&
475475
typeof data.on === 'function' && !isBuffer) {

0 commit comments

Comments
 (0)