base64: error handling

This commit is contained in:
dogeystamp 2022-12-30 17:31:28 -05:00
parent ed1da1faf0
commit 610b20019b
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38

View File

@ -176,8 +176,8 @@ class FormElement extends InterfaceElement {
this.#dataType = x; this.#dataType = x;
} }
#value;
get value() { get value() {
this.clearAlerts();
switch (this.dataType) { switch (this.dataType) {
case "plaintext": case "plaintext":
return this.handle.value; return this.handle.value;
@ -185,7 +185,8 @@ class FormElement extends InterfaceElement {
try { try {
return b64ToBuf(this.handle.value); return b64ToBuf(this.handle.value);
} catch (e) { } catch (e) {
// TODO this.alertBox("alert-error", "Invalid base64 value.");
return;
} }
case "none": case "none":
return undefined; return undefined;