fix sort crash if Value is not string
parent
957ffea74e
commit
faeda7a5de
|
@ -98,8 +98,8 @@ export default defineComponent({
|
||||||
if (this.data) {
|
if (this.data) {
|
||||||
const entries = Object.entries(this.data) as [string, IEntry][];
|
const entries = Object.entries(this.data) as [string, IEntry][];
|
||||||
return entries
|
return entries
|
||||||
.sort(([_, a], [__, b]) => a.value.c.localeCompare(b.value.c))
|
.sort(([_, a], [__, b]) => String(a.value.c).localeCompare(b.value.c))
|
||||||
.sort(([_, a], [__, b]) => a.value.t.localeCompare(b.value.t))
|
.sort(([_, a], [__, b]) => String(a.value.t).localeCompare(b.value.t))
|
||||||
.sort(([_, a], [__, b]) => a.attribute.localeCompare(b.attribute));
|
.sort(([_, a], [__, b]) => a.attribute.localeCompare(b.attribute));
|
||||||
} else {
|
} else {
|
||||||
return [];
|
return [];
|
||||||
|
|
Loading…
Reference in New Issue