@manuscripts/track-changes-plugin 1.7.16 → 1.7.17
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.
|
@@ -121,9 +121,9 @@ function processChangeSteps(changes, startPos, newTr, emptyAttrs, schema) {
|
|
|
121
121
|
const sourceAttrs = (oldUpdate === null || oldUpdate === void 0 ? void 0 : oldUpdate.oldAttrs) || c.node.attrs;
|
|
122
122
|
const { dataTracked } = sourceAttrs, restAttrs = __rest(sourceAttrs, ["dataTracked"]);
|
|
123
123
|
const oldAttrs = lastChangeRejected ? oldUpdate.oldAttrs : restAttrs;
|
|
124
|
-
const newDataTracked =
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
const newDataTracked = [
|
|
125
|
+
...oldDataTracked.filter((d) => !oldUpdate || d.id !== oldUpdate.id || lastChangeRejected),
|
|
126
|
+
];
|
|
127
127
|
const newUpdate = oldUpdate && oldUpdate.status !== change_1.CHANGE_STATUS.rejected
|
|
128
128
|
? Object.assign(Object.assign({}, oldUpdate), { updatedAt: emptyAttrs.updatedAt }) : (0, nodeHelpers_1.addTrackIdIfDoesntExist)(trackUtils.createNewUpdateAttrs(emptyAttrs, lastChangeRejected ? oldAttrs : c.node.attrs));
|
|
129
129
|
if ((JSON.stringify(oldAttrs) !== JSON.stringify(c.newAttrs) ||
|
|
@@ -95,9 +95,9 @@ export function processChangeSteps(changes, startPos, newTr, emptyAttrs, schema)
|
|
|
95
95
|
const sourceAttrs = (oldUpdate === null || oldUpdate === void 0 ? void 0 : oldUpdate.oldAttrs) || c.node.attrs;
|
|
96
96
|
const { dataTracked } = sourceAttrs, restAttrs = __rest(sourceAttrs, ["dataTracked"]);
|
|
97
97
|
const oldAttrs = lastChangeRejected ? oldUpdate.oldAttrs : restAttrs;
|
|
98
|
-
const newDataTracked =
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
const newDataTracked = [
|
|
99
|
+
...oldDataTracked.filter((d) => !oldUpdate || d.id !== oldUpdate.id || lastChangeRejected),
|
|
100
|
+
];
|
|
101
101
|
const newUpdate = oldUpdate && oldUpdate.status !== CHANGE_STATUS.rejected
|
|
102
102
|
? Object.assign(Object.assign({}, oldUpdate), { updatedAt: emptyAttrs.updatedAt }) : addTrackIdIfDoesntExist(trackUtils.createNewUpdateAttrs(emptyAttrs, lastChangeRejected ? oldAttrs : c.node.attrs));
|
|
103
103
|
if ((JSON.stringify(oldAttrs) !== JSON.stringify(c.newAttrs) ||
|
package/package.json
CHANGED