Skip to content

Commit

Permalink
Bind btoa to window when context is not Node
Browse files Browse the repository at this point in the history
  • Loading branch information
vsleibenko authored and cgewecke committed May 8, 2020
1 parent 17e9671 commit 9be703d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/web3-providers-ws/src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if (isNode) {
helpers = require('url').parse;
}
} else {
_btoa = btoa;
_btoa = btoa.bind(window);
helpers = function(url) {
return new URL(url);
};
Expand Down

0 comments on commit 9be703d

Please sign in to comment.