We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LiteBuffer isn't supported in WebWorker context as the code use window object which is undefined in WebWorker
Solution which seems to work for me Use following code in LiteBuffer.js
if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { Object.defineProperty(WorkerGlobalScope, 'Buffer', { configurable: true, enumerable: false, value: Buffer, writable: true, }); } else { Object.defineProperty(window, 'Buffer', { configurable: true, enumerable: false, value: Buffer, writable: true, }); }
instead of only
Object.defineProperty(window, 'Buffer', { configurable: true, enumerable: false, value: Buffer, writable: true, });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
LiteBuffer isn't supported in WebWorker context as the code use window object which is undefined in WebWorker
Solution which seems to work for me
Use following code in LiteBuffer.js
instead of only
The text was updated successfully, but these errors were encountered: