Create a helper function to sort two attributes

This commit is contained in:
Oliver-Akins 2025-07-13 21:49:40 -06:00
parent cade7f6ce5
commit 02a553e6c9

View file

@ -0,0 +1,6 @@
export function attributeSorter(a, b) {
if (a.sort === b.sort) {
return a.name.localeCompare(b.name);
};
return Math.sign(a.sort - b.sort);
};