From 558202a4a99dde37c6afb23cb297f44c3c2f89f0 Mon Sep 17 00:00:00 2001 From: gravel Date: Wed, 20 Dec 2023 20:53:04 +0000 Subject: [PATCH] Fix partial room token matches in JS --- output/js/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output/js/util.js b/output/js/util.js index 74626df..35ba31f 100644 --- a/output/js/util.js +++ b/output/js/util.js @@ -93,7 +93,7 @@ export const dom = { // Support matching shorter legacy IDs in links online const matches = matchIdPrefix ? '^=' : '='; // Support matching room token, but only as a full match (plus symbol and hex code follows) - const id = communityID.includes('+') ? `${communityID}+` : communityID; + const id = !matchIdPrefix || communityID.includes('+') ? communityID : `${communityID}+`; return document.querySelector(`.room-row[${identifier}${matches}"${communityID}"]`); }, /**