Fixed alpha sort in RecipeOrganizerPage (#1354)
This commit is contained in:
parent
8836a258bd
commit
4662253d0e
1 changed files with 1 additions and 7 deletions
|
@ -84,7 +84,7 @@ export default defineComponent({
|
|||
|
||||
if (!props.items) return byLetter;
|
||||
|
||||
props.items.forEach((item) => {
|
||||
props.items.sort((a, b) => a.name.localeCompare(b.name)).forEach((item) => {
|
||||
const letter = item.name[0].toUpperCase();
|
||||
if (!byLetter[letter]) {
|
||||
byLetter[letter] = [];
|
||||
|
@ -92,12 +92,6 @@ export default defineComponent({
|
|||
byLetter[letter].push(item);
|
||||
});
|
||||
|
||||
for (const key in byLetter) {
|
||||
byLetter[key] = byLetter[key].sort((a, b) => {
|
||||
return a.name.localeCompare(b.name);
|
||||
});
|
||||
}
|
||||
|
||||
return byLetter;
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue