From c3f765bdb3504a0ff40454a81f2b4e81846393e1 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Sat, 24 Aug 2024 23:19:16 -0700 Subject: [PATCH] Use lastChild property instead of :last-child selector :last-child considers the most nested child to be "last", whereas lastChild returns the last highest-level child. The latter behavior is desired, otherwise safes with multiple safes as owners will have all the child safe owners attributed to the first child safe. --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 3b2058c..93f5b1d 100644 --- a/index.html +++ b/index.html @@ -250,7 +250,7 @@ allAddresses.push(safe); const newRoot = document.createElement('ul'); - root.querySelector('li:last-child').insertAdjacentElement('beforeend', newRoot); + root.lastChild.insertAdjacentElement('beforeend', newRoot); for (const owner of owners) { await insertTreeNode(newRoot, owner, rpc); } -- 2.47.3