Skip to content

Commit 212c02c

Browse files
committed
Ensure that readBigInt64BE is function before call it
1 parent 602cd63 commit 212c02c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/frame.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function readInt64BE(buffer, offset) {
6060
* We try to use native implementation if available here because
6161
* buffer-more-ints does not
6262
*/
63-
if (Buffer.prototype.readBigInt64BE) {
63+
if (typeof Buffer.prototype.readBigInt64BE === 'function') {
6464
return Number(buffer.readBigInt64BE(offset))
6565
}
6666

0 commit comments

Comments
 (0)