@manuscripts/track-changes-plugin 1.7.12 → 1.7.13-LEAN-3608.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.
@@ -116,9 +116,9 @@ function processChangeSteps(changes, startPos, newTr, emptyAttrs, schema) {
116
116
  const sourceAttrs = (oldUpdate === null || oldUpdate === void 0 ? void 0 : oldUpdate.oldAttrs) || c.node.attrs;
117
117
  const { dataTracked } = sourceAttrs, restAttrs = __rest(sourceAttrs, ["dataTracked"]);
118
118
  const oldAttrs = lastChangeRejected ? oldUpdate.oldAttrs : restAttrs;
119
- const newDataTracked = [
120
- ...oldDataTracked.filter((d) => !oldUpdate || d.id !== oldUpdate.id || lastChangeRejected),
121
- ];
119
+ const newDataTracked = c.node.type != c.node.type.schema.nodes.list
120
+ ? [...oldDataTracked.filter((d) => !oldUpdate || d.id !== oldUpdate.id || lastChangeRejected)]
121
+ : [];
122
122
  const newUpdate = oldUpdate && oldUpdate.status !== change_1.CHANGE_STATUS.rejected
123
123
  ? Object.assign(Object.assign({}, oldUpdate), { updatedAt: emptyAttrs.updatedAt }) : (0, nodeHelpers_1.addTrackIdIfDoesntExist)(trackUtils.createNewUpdateAttrs(emptyAttrs, lastChangeRejected ? oldAttrs : c.node.attrs));
124
124
  if ((JSON.stringify(oldAttrs) !== JSON.stringify(c.newAttrs) ||
@@ -90,9 +90,9 @@ export function processChangeSteps(changes, startPos, newTr, emptyAttrs, schema)
90
90
  const sourceAttrs = (oldUpdate === null || oldUpdate === void 0 ? void 0 : oldUpdate.oldAttrs) || c.node.attrs;
91
91
  const { dataTracked } = sourceAttrs, restAttrs = __rest(sourceAttrs, ["dataTracked"]);
92
92
  const oldAttrs = lastChangeRejected ? oldUpdate.oldAttrs : restAttrs;
93
- const newDataTracked = [
94
- ...oldDataTracked.filter((d) => !oldUpdate || d.id !== oldUpdate.id || lastChangeRejected),
95
- ];
93
+ const newDataTracked = c.node.type != c.node.type.schema.nodes.list
94
+ ? [...oldDataTracked.filter((d) => !oldUpdate || d.id !== oldUpdate.id || lastChangeRejected)]
95
+ : [];
96
96
  const newUpdate = oldUpdate && oldUpdate.status !== CHANGE_STATUS.rejected
97
97
  ? Object.assign(Object.assign({}, oldUpdate), { updatedAt: emptyAttrs.updatedAt }) : addTrackIdIfDoesntExist(trackUtils.createNewUpdateAttrs(emptyAttrs, lastChangeRejected ? oldAttrs : c.node.attrs));
98
98
  if ((JSON.stringify(oldAttrs) !== JSON.stringify(c.newAttrs) ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manuscripts/track-changes-plugin",
3
- "version": "1.7.12",
3
+ "version": "1.7.13-LEAN-3608.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",