1
Fork 0

Fix a bug where comments without votes would end up being 'Vot'.

This commit is contained in:
Bauke 2022-02-23 23:42:21 +01:00
parent 8a19364636
commit 6b8c4e19cc
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,10 @@ function hideVotes(settings: Settings): number {
for (const vote of commentVotes) { for (const vote of commentVotes) {
vote.classList.add('trx-votes-hidden'); vote.classList.add('trx-votes-hidden');
if (!vote.textContent!.includes(' ')) {
continue;
}
vote.textContent = vote.textContent!.slice( vote.textContent = vote.textContent!.slice(
0, 0,
vote.textContent!.indexOf(' '), vote.textContent!.indexOf(' '),