@manuscripts/transform 3.0.46 → 3.0.47-LEAN-4439.0

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.
@@ -164,7 +164,6 @@ const createBackmatter = (doc, body, sectionCategories, createElement) => {
164
164
  };
165
165
  exports.createBackmatter = createBackmatter;
166
166
  const moveFootnotes = (doc, group, createElement) => {
167
- var _a;
168
167
  const fns = [
169
168
  ...doc.querySelectorAll('fn:not(table-wrap-foot fn, author-notes fn)'),
170
169
  ];
@@ -179,7 +178,13 @@ const moveFootnotes = (doc, group, createElement) => {
179
178
  section = createFootnotesSection([fnGroup], createElement);
180
179
  }
181
180
  if (section) {
182
- group.insertBefore(section, ((_a = group.firstChild) === null || _a === void 0 ? void 0 : _a.nextSibling) || group.firstChild);
181
+ const lastChild = group.lastChild;
182
+ if (lastChild) {
183
+ group.insertBefore(section, lastChild);
184
+ }
185
+ else {
186
+ group.appendChild(section);
187
+ }
183
188
  }
184
189
  };
185
190
  const moveSpecialFootnotes = (doc, group, sectionCategories, createElement) => {
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = "3.0.46";
4
+ exports.VERSION = "3.0.47-LEAN-4439.0";
@@ -150,7 +150,6 @@ export const createBackmatter = (doc, body, sectionCategories, createElement) =>
150
150
  body.append(group);
151
151
  };
152
152
  const moveFootnotes = (doc, group, createElement) => {
153
- var _a;
154
153
  const fns = [
155
154
  ...doc.querySelectorAll('fn:not(table-wrap-foot fn, author-notes fn)'),
156
155
  ];
@@ -165,7 +164,13 @@ const moveFootnotes = (doc, group, createElement) => {
165
164
  section = createFootnotesSection([fnGroup], createElement);
166
165
  }
167
166
  if (section) {
168
- group.insertBefore(section, ((_a = group.firstChild) === null || _a === void 0 ? void 0 : _a.nextSibling) || group.firstChild);
167
+ const lastChild = group.lastChild;
168
+ if (lastChild) {
169
+ group.insertBefore(section, lastChild);
170
+ }
171
+ else {
172
+ group.appendChild(section);
173
+ }
169
174
  }
170
175
  };
171
176
  const moveSpecialFootnotes = (doc, group, sectionCategories, createElement) => {
@@ -1 +1 @@
1
- export const VERSION = "3.0.46";
1
+ export const VERSION = "3.0.47-LEAN-4439.0";
@@ -1 +1 @@
1
- export declare const VERSION = "3.0.46";
1
+ export declare const VERSION = "3.0.47-LEAN-4439.0";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@manuscripts/transform",
3
3
  "description": "ProseMirror transformer for Manuscripts applications",
4
- "version": "3.0.46",
4
+ "version": "3.0.47-LEAN-4439.0",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-transform",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",