From: Ardis Lu Date: Tue, 11 Jul 2023 02:51:54 +0000 (-0700) Subject: Clear pillContainer when there are no functions X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=53f74fb2b0a0309fe4cbd88e1453572ce055e2b9;p=simulate-etherscan-function-display Clear pillContainer when there are no functions --- 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);