Fix partial room token matches in JS

dev
gravel 1 year ago
parent 558202a4a9
commit 6914324dca
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -93,8 +93,8 @@ 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 = !matchIdPrefix || communityID.includes('+') ? communityID : `${communityID}+`;
return document.querySelector(`.room-row[${identifier}${matches}"${communityID}"]`);
const id = (!matchIdPrefix || communityID.includes('+')) ? communityID : `${communityID}+`;
return document.querySelector(`.room-row[${identifier}${matches}"${id}"]`);
},
/**
* @param {HTMLTableRowElement} row

Loading…
Cancel
Save