chiark / gitweb /
bugfix
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 12 Jul 2020 21:11:34 +0000 (22:11 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 12 Jul 2020 21:11:34 +0000 (22:11 +0100)
templates/script.ts

index 1363d87cc980ede705df53c41af9303fb58bbcd6..94e2d06ba45d2f0a92af736ae4e30099246497d6 100644 (file)
@@ -261,7 +261,8 @@ function redisplay_ancillaries(piece: PieceId, p: PieceInfo) {
 
   for (let celem = p.pelem.firstElementChild;
        celem != null;
-       celem = celem.nextElementSibling) {
+       celem = nextelem) {
+    var nextelem = celem.nextElementSibling
     let thref = celem.getAttributeNS(null,"href");
     if (thref == href) {
       celem.remove();