@manuscripts/body-editor 1.7.29 → 1.7.30

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.
@@ -14,11 +14,11 @@ const isInlineFootnoteChange = (step, oldState, newState) => {
14
14
  exports.default = () => {
15
15
  return new prosemirror_state_1.Plugin({
16
16
  appendTransaction(transactions, oldState, newState) {
17
- const tableInlineFootnoteChange = transactions.find((tr) => tr.steps.find((s) => {
17
+ const tableInlineFootnoteChange = transactions.find((tr) => tr.steps.find((s, i) => {
18
18
  var _a;
19
19
  if (s instanceof prosemirror_transform_1.ReplaceStep) {
20
20
  const step = s;
21
- const $pos = oldState.doc.resolve(step.from);
21
+ const $pos = tr.docs[i].resolve(step.from);
22
22
  return (((_a = $pos.node($pos.depth - 2)) === null || _a === void 0 ? void 0 : _a.type) === transform_1.schema.nodes.table &&
23
23
  isInlineFootnoteChange(step, oldState, newState));
24
24
  }
@@ -12,11 +12,11 @@ const isInlineFootnoteChange = (step, oldState, newState) => {
12
12
  export default () => {
13
13
  return new Plugin({
14
14
  appendTransaction(transactions, oldState, newState) {
15
- const tableInlineFootnoteChange = transactions.find((tr) => tr.steps.find((s) => {
15
+ const tableInlineFootnoteChange = transactions.find((tr) => tr.steps.find((s, i) => {
16
16
  var _a;
17
17
  if (s instanceof ReplaceStep) {
18
18
  const step = s;
19
- const $pos = oldState.doc.resolve(step.from);
19
+ const $pos = tr.docs[i].resolve(step.from);
20
20
  return (((_a = $pos.node($pos.depth - 2)) === null || _a === void 0 ? void 0 : _a.type) === schema.nodes.table &&
21
21
  isInlineFootnoteChange(step, oldState, newState));
22
22
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@manuscripts/body-editor",
3
3
  "description": "Prosemirror components for editing and viewing manuscripts",
4
- "version": "1.7.29",
4
+ "version": "1.7.30",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",