mirror of
https://github.com/remko/waforth
synced 2025-01-13 08:01:32 +01:00
fix lint error
This commit is contained in:
parent
5aa2485cd4
commit
c64957e41e
1 changed files with 3 additions and 2 deletions
|
@ -4,8 +4,9 @@ const isSafari =
|
|||
typeof navigator != "undefined" &&
|
||||
/^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const arrayToBase64 =
|
||||
typeof "Buffer" === "undefined"
|
||||
typeof Buffer === "undefined"
|
||||
? function arrayToBase64(bytes) {
|
||||
var binary = "";
|
||||
var len = bytes.byteLength;
|
||||
|
@ -14,7 +15,7 @@ const arrayToBase64 =
|
|||
}
|
||||
return window.btoa(binary);
|
||||
}
|
||||
: function arrayToBase64(bytes) {
|
||||
: function arrayToBase64(s) {
|
||||
return Buffer.from(s).toString("base64");
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue