From 01cbb813e1aeb42eb24b4bf8666355d8dce75cfc Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Wed, 3 Apr 2024 22:51:07 -0700 Subject: [PATCH] Do not show "no events" message if input is blank It doesn't make sense to say "no events were found" if there is no input. This can be confusing if a user clears their input and expects the tool to revert to its initial state. --- index.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.html b/index.html index bdc7021..adab3dd 100644 --- a/index.html +++ b/index.html @@ -365,6 +365,11 @@ buttonContainer.style.setProperty('opacity', 0); tableBody.innerHTML = ''; + // Input has been cleared, reset back to default state + if (textarea.value === '') { + return; + } + const events = getEvents(textarea.value); const uniqueEvents = Array.from(new Set(events)); if (events.length === 0) { -- 2.47.3