From 915e3daa069c5291052896416f630af8cfdea0b3 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Wed, 30 Jun 2021 03:11:26 -0400 Subject: [PATCH] Convert data-local-id to number when needed --- puppet/src/contentscript.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/puppet/src/contentscript.js b/puppet/src/contentscript.js index 9843686..66ec9e4 100644 --- a/puppet/src/contentscript.js +++ b/puppet/src/contentscript.js @@ -916,7 +916,7 @@ class MautrixController { !change.target.classList.contains("MdNonDisp")) { const msgElement = change.target.closest(".mdRGT07Own") if (msgElement) { - let id = +msgElement.getAttribute("data-local-id") + const id = +msgElement.getAttribute("data-local-id") if (!receipt_id || receipt_id < id) { receipt_id = id } @@ -1086,7 +1086,7 @@ class MautrixController { // Skip timestamps, as these are always current child.classList.contains("MdRGT07Cont")) { - const msgID = child.getAttribute("data-local-id") + const msgID = +child.getAttribute("data-local-id") if (msgID > minID) { pendingMsgElements.add(child)