diff --git a/module/utils/attributeSort.mjs b/module/utils/attributeSort.mjs new file mode 100644 index 0000000..7e114d3 --- /dev/null +++ b/module/utils/attributeSort.mjs @@ -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); +};