fix sort crash if Value is not string

feat/vaults
Tomáš Mládek 2021-03-25 21:29:15 +01:00
parent 957ffea74e
commit faeda7a5de
1 changed files with 2 additions and 2 deletions

View File

@ -98,8 +98,8 @@ export default defineComponent({
if (this.data) {
const entries = Object.entries(this.data) as [string, IEntry][];
return entries
.sort(([_, a], [__, b]) => a.value.c.localeCompare(b.value.c))
.sort(([_, a], [__, b]) => a.value.t.localeCompare(b.value.t))
.sort(([_, a], [__, b]) => String(a.value.c).localeCompare(b.value.c))
.sort(([_, a], [__, b]) => String(a.value.t).localeCompare(b.value.t))
.sort(([_, a], [__, b]) => a.attribute.localeCompare(b.attribute));
} else {
return [];