From 53f74fb2b0a0309fe4cbd88e1453572ce055e2b9 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Mon, 10 Jul 2023 19:51:54 -0700 Subject: [PATCH] Clear pillContainer when there are no functions --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 63c817a..1dc5cb6 100644 --- a/index.html +++ b/index.html @@ -171,12 +171,12 @@ const textarea = document.querySelector('textarea'); const pillContainer = document.querySelector('.pill-container'); textarea.addEventListener('input', debounce(() => { + pillContainer.innerHTML = ''; const functions = getFunctions(textarea.value); if (functions.length === 0) { return; } - pillContainer.innerHTML = ''; let tooltipCounter = 1; for (const fn of functions) { const displayName = camelCaseToTitleCase(fn); -- 2.47.3