Skip to content

Commit bc418fd

Browse files
qpeelablazzy
authored andcommitted
check isBuffer function (#157)
1 parent 4c2d61f commit bc418fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/type.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default function(val) {
3535
return 'element';
3636
}
3737

38-
if (typeof Buffer !== 'undefined' && Buffer.isBuffer(val)) {
38+
if (typeof Buffer !== 'undefined' && typeof Buffer.isBuffer === 'function' && Buffer.isBuffer(val)) {
3939
return 'buffer';
4040
}
4141

0 commit comments

Comments
 (0)