@manuscripts/track-changes-plugin 1.10.5-LEAN-4160.2 → 1.10.5-LEAN-4160.3

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.
@@ -39,7 +39,7 @@ function trackTransaction(tr, oldState, newTr, authorID, changeSet) {
39
39
  tr.steps.forEach((step) => {
40
40
  var _a;
41
41
  if (step instanceof prosemirror_transform_1.ReplaceStep) {
42
- const doc = tr.docs[tr.steps.indexOf(step)] || tr.docs[0];
42
+ const doc = tr.docs[tr.steps.indexOf(step)];
43
43
  if ((0, track_utils_1.isDeletingPendingMovedNode)(step, doc)) {
44
44
  const node = doc.nodeAt(step.from);
45
45
  (_a = node === null || node === void 0 ? void 0 : node.attrs.dataTracked) === null || _a === void 0 ? void 0 : _a.forEach((tracked) => {
@@ -100,7 +100,7 @@ const isNodeMoveOperation = (tr) => {
100
100
  const insertedHashes = new Set();
101
101
  for (let i = 0; i < tr.steps.length; i++) {
102
102
  const step = tr.steps[i];
103
- const doc = tr.docs[i] || tr.docs[0];
103
+ const doc = tr.docs[i];
104
104
  const content = step.slice.size === 0 ? doc.slice(step.from, step.to) : step.slice;
105
105
  if (step.from !== step.to && step.slice.size === 0) {
106
106
  if (content.content.firstChild) {
@@ -33,7 +33,7 @@ export function trackTransaction(tr, oldState, newTr, authorID, changeSet) {
33
33
  tr.steps.forEach((step) => {
34
34
  var _a;
35
35
  if (step instanceof ReplaceStep) {
36
- const doc = tr.docs[tr.steps.indexOf(step)] || tr.docs[0];
36
+ const doc = tr.docs[tr.steps.indexOf(step)];
37
37
  if (isDeletingPendingMovedNode(step, doc)) {
38
38
  const node = doc.nodeAt(step.from);
39
39
  (_a = node === null || node === void 0 ? void 0 : node.attrs.dataTracked) === null || _a === void 0 ? void 0 : _a.forEach((tracked) => {
@@ -85,7 +85,7 @@ export const isNodeMoveOperation = (tr) => {
85
85
  const insertedHashes = new Set();
86
86
  for (let i = 0; i < tr.steps.length; i++) {
87
87
  const step = tr.steps[i];
88
- const doc = tr.docs[i] || tr.docs[0];
88
+ const doc = tr.docs[i];
89
89
  const content = step.slice.size === 0 ? doc.slice(step.from, step.to) : step.slice;
90
90
  if (step.from !== step.to && step.slice.size === 0) {
91
91
  if (content.content.firstChild) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manuscripts/track-changes-plugin",
3
- "version": "1.10.5-LEAN-4160.2",
3
+ "version": "1.10.5-LEAN-4160.3",
4
4
  "author": "Atypon Systems LLC",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/Atypon-OpenSource/manuscripts-track-changes-plugin",