From df6ecf2abdce07c6b394ab6ecc78854b2cde01dd Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Sat, 20 Aug 2022 23:30:41 -0700 Subject: [PATCH] Replace previous results in the table body --- index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index d126cdb..1764db0 100644 --- a/index.html +++ b/index.html @@ -74,7 +74,6 @@ Address - @@ -147,8 +146,10 @@ body: JSON.stringify(batchPayload), }).then(r => r.json()); + table.querySelector('tbody')?.remove(); // Clear previous rows, if any + const body = table.createTBody(); for (const [index, response] of batchResponse.entries()) { - const row = table.insertRow(); + const row = body.insertRow(); const ens = row.insertCell(); const address = row.insertCell(); -- 2.47.3