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

@@ -473,7 +473,7 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget {
async renderOwnedAttributes(ownedAttributes, saved) {
// attrs are not resorted if position changes after the initial load
ownedAttributes.sort((a, b) => a.position < b.position ? -1 : 1);
ownedAttributes.sort((a, b) => a.position - b.position);
let htmlAttrs = (await attributeRenderer.renderAttributes(ownedAttributes, true)).html();