1
0
Fork 0
mirror of https://github.com/Luzifer/twitch-bot.git synced 2025-01-03 10:16:01 +00:00

[editor] Fix: Allow empty description in sorting / filter

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2022-04-25 22:47:55 +02:00
parent 86144f8783
commit 967e301390
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

View file

@ -615,8 +615,8 @@ export default {
filteredRules() {
const rules = [...this.rules]
.filter(rule => !this.filter || rule.description.toLocaleLowerCase().includes(this.filter.toLocaleLowerCase()))
rules.sort((a, b) => a.description.toLocaleLowerCase().localeCompare(b.description.toLocaleLowerCase()))
.filter(rule => !this.filter || rule.description?.toLocaleLowerCase().includes(this.filter?.toLocaleLowerCase()))
rules.sort((a, b) => a.description?.toLocaleLowerCase().localeCompare(b.description?.toLocaleLowerCase()))
return rules
},
},