From 610b20019be398df029f87aa6f84b38095fde006 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Fri, 30 Dec 2022 17:31:28 -0500 Subject: [PATCH] base64: error handling --- scripts/interface.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/interface.js b/scripts/interface.js index d306d32..442109c 100644 --- a/scripts/interface.js +++ b/scripts/interface.js @@ -176,8 +176,8 @@ class FormElement extends InterfaceElement { this.#dataType = x; } - #value; get value() { + this.clearAlerts(); switch (this.dataType) { case "plaintext": return this.handle.value; @@ -185,7 +185,8 @@ class FormElement extends InterfaceElement { try { return b64ToBuf(this.handle.value); } catch (e) { - // TODO + this.alertBox("alert-error", "Invalid base64 value."); + return; } case "none": return undefined;