Skip to content

Commit edd4918

Browse files
ChALkeRljharb
andauthored
Update index.js
Co-authored-by: Jordan Harband <[email protected]>
1 parent 4c7cdda commit edd4918

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@ CipherBase.prototype.update = function (data, inputEnc, outputEnc) {
4848
* Doesn't make sense with other TypedArray instances
4949
*/
5050
bufferData = Buffer.from(data);
51-
} else if (Buffer.isBuffer(data) && data.constructor && data.constructor.isBuffer && data.constructor.isBuffer(data)) {
51+
} else if (
52+
Buffer.isBuffer(data)
53+
&& data.constructor
54+
&& data.constructor.isBuffer
55+
&& data.constructor.isBuffer(data)
56+
) {
5257
/*
5358
* Old Buffer polyfill on an engine that doesn't have TypedArray support
5459
* Also, this is from a different Buffer polyfill implementation then we have, as instanceof check failed

0 commit comments

Comments
 (0)