From f6c7be3e515832e866925da1b32c57f723612a17 Mon Sep 17 00:00:00 2001 From: Serraniel Date: Wed, 7 Oct 2020 21:19:14 +0200 Subject: [PATCH] =?UTF-8?q?#67=20Don=C2=B4t=20set=20border=20of=20last=20i?= =?UTF-8?q?tem?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This doesn´t work completly yet, as the border also does not get "late added" when there actually spawns a new list item afterwards... --- src/javascript/enhancements/lists.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/javascript/enhancements/lists.js b/src/javascript/enhancements/lists.js index eb6ffa6..330bc1d 100644 --- a/src/javascript/enhancements/lists.js +++ b/src/javascript/enhancements/lists.js @@ -19,11 +19,11 @@ function addListHorizontalSeparators(node) { } // are we target tag? - if (node.tagName === targetTagName) { + if (node.tagName === targetTagName && typeof element.nextSibling !== "undefined") { updateFunc(node); } else { // find items -> all - let requestItems = node.querySelectorAll('md-list-item'); + let requestItems = node.querySelectorAll('md-list-item:not(:last-child)'); // update borders requestItems.forEach(item => {