fixes to stable sorting

This commit is contained in:
zadam
2023-11-03 01:11:47 +01:00
parent 45ed436426
commit f37f47ce5b
9 changed files with 23 additions and 20 deletions

View File

@@ -83,7 +83,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget {
// attrs are not resorted if position changes after the initial load
// promoted attrs are sorted primarily by order of definitions, but with multi-valued promoted attrs
// the order of attributes is important as well
ownedAttributes.sort((a, b) => a.position < b.position ? -1 : 1);
ownedAttributes.sort((a, b) => a.position - b.position);
if (promotedDefAttrs.length === 0) {
this.toggleInt(false);