@manuscripts/track-changes-plugin 0.4.5 → 0.4.6

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.
package/dist/index.cjs CHANGED
@@ -1644,7 +1644,7 @@ function trackTransaction(tr, oldState, newTr, authorID) {
1644
1644
  };
1645
1645
  // Must use constructor.name instead of instanceof as aliasing prosemirror-state is a lot more
1646
1646
  // difficult than prosemirror-transform
1647
- const wasNodeSelection = tr.selection.constructor.name === 'NodeSelection';
1647
+ const wasNodeSelection = tr.selection instanceof prosemirrorState.NodeSelection;
1648
1648
  let iters = 0;
1649
1649
  log.info('ORIGINAL transaction', tr);
1650
1650
  tr.steps.forEach((step) => {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { PluginKey, Plugin } from 'prosemirror-state';
1
+ import { NodeSelection, PluginKey, Plugin } from 'prosemirror-state';
2
2
  import debug from 'debug';
3
3
  import { liftTarget, canJoin, Mapping, ReplaceStep, ReplaceAroundStep } from 'prosemirror-transform';
4
4
  import { Fragment, Slice } from 'prosemirror-model';
@@ -1636,7 +1636,7 @@ function trackTransaction(tr, oldState, newTr, authorID) {
1636
1636
  };
1637
1637
  // Must use constructor.name instead of instanceof as aliasing prosemirror-state is a lot more
1638
1638
  // difficult than prosemirror-transform
1639
- const wasNodeSelection = tr.selection.constructor.name === 'NodeSelection';
1639
+ const wasNodeSelection = tr.selection instanceof NodeSelection;
1640
1640
  let iters = 0;
1641
1641
  log.info('ORIGINAL transaction', tr);
1642
1642
  tr.steps.forEach((step) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manuscripts/track-changes-plugin",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "author": "Atypon Systems LLC",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/Atypon-OpenSource/manuscripts-quarterback/tree/main/quarterback-packages/track-changes-plugin",