@manuscripts/track-changes-plugin 1.7.9 → 1.7.10
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.
|
@@ -20,9 +20,10 @@ function deleteNode(node, pos, tr) {
|
|
|
20
20
|
exports.deleteNode = deleteNode;
|
|
21
21
|
function deleteOrSetNodeDeleted(node, pos, newTr, deleteAttrs) {
|
|
22
22
|
const dataTracked = (0, nodeHelpers_1.getBlockInlineTrackedData)(node);
|
|
23
|
-
const inserted = dataTracked === null || dataTracked === void 0 ? void 0 : dataTracked.find((d) => d.operation === change_1.CHANGE_OPERATION.insert &&
|
|
23
|
+
const inserted = dataTracked === null || dataTracked === void 0 ? void 0 : dataTracked.find((d) => d.operation === change_1.CHANGE_OPERATION.insert &&
|
|
24
|
+
(d.status === change_1.CHANGE_STATUS.pending || d.status === change_1.CHANGE_STATUS.accepted));
|
|
24
25
|
const updated = dataTracked === null || dataTracked === void 0 ? void 0 : dataTracked.find((d) => d.operation === change_1.CHANGE_OPERATION.set_node_attributes);
|
|
25
|
-
if (inserted
|
|
26
|
+
if (inserted) {
|
|
26
27
|
return deleteNode(node, pos, newTr);
|
|
27
28
|
}
|
|
28
29
|
if (!newTr.doc.nodeAt(pos)) {
|
|
@@ -16,9 +16,10 @@ export function deleteNode(node, pos, tr) {
|
|
|
16
16
|
}
|
|
17
17
|
export function deleteOrSetNodeDeleted(node, pos, newTr, deleteAttrs) {
|
|
18
18
|
const dataTracked = getBlockInlineTrackedData(node);
|
|
19
|
-
const inserted = dataTracked === null || dataTracked === void 0 ? void 0 : dataTracked.find((d) => d.operation === CHANGE_OPERATION.insert &&
|
|
19
|
+
const inserted = dataTracked === null || dataTracked === void 0 ? void 0 : dataTracked.find((d) => d.operation === CHANGE_OPERATION.insert &&
|
|
20
|
+
(d.status === CHANGE_STATUS.pending || d.status === CHANGE_STATUS.accepted));
|
|
20
21
|
const updated = dataTracked === null || dataTracked === void 0 ? void 0 : dataTracked.find((d) => d.operation === CHANGE_OPERATION.set_node_attributes);
|
|
21
|
-
if (inserted
|
|
22
|
+
if (inserted) {
|
|
22
23
|
return deleteNode(node, pos, newTr);
|
|
23
24
|
}
|
|
24
25
|
if (!newTr.doc.nodeAt(pos)) {
|
package/package.json
CHANGED