Fix a bug where comments without votes would end up being 'Vot'.
This commit is contained in:
parent
8a19364636
commit
6b8c4e19cc
|
@ -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(' '),
|
||||||
|
|
Loading…
Reference in New Issue