From c64957e41ec0f56bcae1591f6a32bd72f97269b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Thu, 14 Apr 2022 23:00:45 +0200 Subject: [PATCH] fix lint error --- src/shell/WAForth.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/shell/WAForth.js b/src/shell/WAForth.js index 4141c81..55a28d8 100644 --- a/src/shell/WAForth.js +++ b/src/shell/WAForth.js @@ -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"); };