From 7cc7bd725e1fe0ddaee35d82d41be51671d7f24b Mon Sep 17 00:00:00 2001 From: YOGAK B4DUT <154754086+prayogak@users.noreply.github.com> Date: Tue, 23 Apr 2024 23:27:11 +0700 Subject: [PATCH] Update base64.html --- sc/html/base64.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sc/html/base64.html b/sc/html/base64.html index fc077a9..d642656 100644 --- a/sc/html/base64.html +++ b/sc/html/base64.html @@ -23,6 +23,11 @@ var input = document.getElementById("text-input").value.trim(); var output = document.getElementById("output"); + if (input === "") { + output.innerText = "Input cannot be empty!"; + return; + } + if (action === "decode") { try { var decoded = decodeURIComponent(escape(atob(input)));