Cards, CustomFields sorted alphabetically #3517

- last fix didn't work and disabled alphabetic sorting
- also works with linked cards
This commit is contained in:
Martin Filser 2021-02-02 17:39:44 +01:00
parent 81fdc9a865
commit c0b9ef5990

View file

@ -724,9 +724,7 @@ Cards.helpers({
definition,
};
});
if (ret.definition !== undefined) {
ret.sort((a, b) => a.definition.name.localeCompare(b.definition.name));
}
ret.sort((a, b) => a.definition.name !== undefined && b.definition.name !== undefined && a.definition.name.localeCompare(b.definition.name));
return ret;
},