diff --git a/sea.js b/sea.js index 92a0a0c69..c0cd5860a 100644 --- a/sea.js +++ b/sea.js @@ -51,7 +51,7 @@ if(typeof Buffer === "undefined") { root.Buffer = require("buffer").Buffer } - if(typeof btoa !== "undefined"){ + if(typeof btoa === "undefined"){ root.btoa = function (data) { return Buffer.from(data, "binary").toString("base64"); }; root.atob = function (data) { return Buffer.from(data, "base64").toString("binary"); }; } diff --git a/sea/base64.js b/sea/base64.js index 48b78725e..3eff26823 100644 --- a/sea/base64.js +++ b/sea/base64.js @@ -2,7 +2,7 @@ if(typeof Buffer === "undefined") { root.Buffer = require("buffer").Buffer } - if(typeof btoa !== "undefined"){ + if(typeof btoa === "undefined"){ root.btoa = function (data) { return Buffer.from(data, "binary").toString("base64"); }; root.atob = function (data) { return Buffer.from(data, "base64").toString("binary"); }; }