]> git.ardis.lu - safe-owners/commitdiff
Use lastChild property instead of :last-child selector
authorArdis Lu <ardisglu@gmail.com>
Sun, 25 Aug 2024 06:19:16 +0000 (23:19 -0700)
committerArdis Lu <ardisglu@gmail.com>
Sun, 25 Aug 2024 06:19:16 +0000 (23:19 -0700)
: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

index 3b2058c4a8dbe607135846125b74d9835b017eb8..93f5b1d581d90747c2ce0f27c5bf908f3ca023c9 100644 (file)
       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);
       }
This page took 0.033807 seconds and 4 git commands to generate.