@manuscripts/track-changes-plugin 1.7.5-LEAN-3373-0 → 1.7.5-LEAN-3373-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,7 +32,7 @@ function applyAcceptedRejectedChanges(tr, schema, changes, deleteMap = new prose
32
32
  const arr = attrsChangesLog.get(nodeId) || attrsChangesLog.set(nodeId, []).get(nodeId);
33
33
  arr.push(changeId);
34
34
  }
35
- changes.sort((c1) => (c1.type === 'node-attr-change' ? -1 : 0));
35
+ changes.sort((c1, c2) => c1.dataTracked.updatedAt - c2.dataTracked.updatedAt);
36
36
  changes.forEach((change) => {
37
37
  const { pos: from, deleted } = deleteMap.mapResult(change.from), node = tr.doc.nodeAt(from), noChangeNeeded = deleted || !ChangeSet_1.ChangeSet.shouldDeleteChange(change);
38
38
  if (!node) {
@@ -29,7 +29,7 @@ export function applyAcceptedRejectedChanges(tr, schema, changes, deleteMap = ne
29
29
  const arr = attrsChangesLog.get(nodeId) || attrsChangesLog.set(nodeId, []).get(nodeId);
30
30
  arr.push(changeId);
31
31
  }
32
- changes.sort((c1) => (c1.type === 'node-attr-change' ? -1 : 0));
32
+ changes.sort((c1, c2) => c1.dataTracked.updatedAt - c2.dataTracked.updatedAt);
33
33
  changes.forEach((change) => {
34
34
  const { pos: from, deleted } = deleteMap.mapResult(change.from), node = tr.doc.nodeAt(from), noChangeNeeded = deleted || !ChangeSet.shouldDeleteChange(change);
35
35
  if (!node) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manuscripts/track-changes-plugin",
3
- "version": "1.7.5-LEAN-3373-0",
3
+ "version": "1.7.5-LEAN-3373-1",
4
4
  "author": "Atypon Systems LLC",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/Atypon-OpenSource/manuscripts-track-changes-plugin",