mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-06-14 16:41:21 +00:00
Using polyfill for Buffer in browsers (#129)
This commit is contained in:
4
src/internal/Buffer.ts
Normal file
4
src/internal/Buffer.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import { isBrowser } from 'browser-or-node';
|
||||
import { Buffer as BufferPolyfill } from 'buffer';
|
||||
|
||||
export default isBrowser ? BufferPolyfill : Buffer;
|
Reference in New Issue
Block a user