diff --git a/lib/utils.js b/lib/utils.js index 2f091634..a5d4c146 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -515,7 +515,7 @@ class Tap { } setData (buf, pos) { - if (buf instanceof Buffer) { + if (typeof Buffer === 'function' && buf instanceof Buffer) { buf = new Uint8Array(buf.buffer, buf.byteOffset, buf.length); } this.arr = buf;