@manuscripts/transform 1.4.4-LEAN-2737 → 1.4.4-LEAN-2737-1

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.
@@ -628,20 +628,16 @@ class JATSExporter {
628
628
  warn(`${node.attrs.id} has no rid`);
629
629
  return node.attrs.label;
630
630
  }
631
- const citation = getModel(node.attrs.rid);
632
- if (!citation) {
633
- warn(`Missing citation ${node.attrs.rid}`);
634
- return '';
635
- }
636
- const rids = citation.embeddedCitationItems.filter((item) => {
631
+ const rids = node.attrs
632
+ .embeddedCitationItems.filter((item) => {
637
633
  if (!this.modelMap.has(item.bibliographyItem)) {
638
- warn(`Missing ${item.bibliographyItem} referenced by ${citation._id}`);
634
+ warn(`Missing ${item.bibliographyItem} referenced by ${node.attrs.rid}`);
639
635
  return false;
640
636
  }
641
637
  return true;
642
638
  });
643
639
  if (!rids.length) {
644
- warn(`${citation._id} has no confirmed rids`);
640
+ warn(`${node.attrs.rid} has no confirmed rids`);
645
641
  return '';
646
642
  }
647
643
  const xref = this.document.createElement('xref');
@@ -26,7 +26,7 @@ exports.citation = {
26
26
  contents: { default: '' },
27
27
  selectedText: { default: '' },
28
28
  dataTracked: { default: null },
29
- embeddedCitationItems: { default: null },
29
+ embeddedCitationItems: { default: [] },
30
30
  },
31
31
  parseDOM: [
32
32
  {
@@ -621,20 +621,16 @@ export class JATSExporter {
621
621
  warn(`${node.attrs.id} has no rid`);
622
622
  return node.attrs.label;
623
623
  }
624
- const citation = getModel(node.attrs.rid);
625
- if (!citation) {
626
- warn(`Missing citation ${node.attrs.rid}`);
627
- return '';
628
- }
629
- const rids = citation.embeddedCitationItems.filter((item) => {
624
+ const rids = node.attrs
625
+ .embeddedCitationItems.filter((item) => {
630
626
  if (!this.modelMap.has(item.bibliographyItem)) {
631
- warn(`Missing ${item.bibliographyItem} referenced by ${citation._id}`);
627
+ warn(`Missing ${item.bibliographyItem} referenced by ${node.attrs.rid}`);
632
628
  return false;
633
629
  }
634
630
  return true;
635
631
  });
636
632
  if (!rids.length) {
637
- warn(`${citation._id} has no confirmed rids`);
633
+ warn(`${node.attrs.rid} has no confirmed rids`);
638
634
  return '';
639
635
  }
640
636
  const xref = this.document.createElement('xref');
@@ -23,7 +23,7 @@ export const citation = {
23
23
  contents: { default: '' },
24
24
  selectedText: { default: '' },
25
25
  dataTracked: { default: null },
26
- embeddedCitationItems: { default: null },
26
+ embeddedCitationItems: { default: [] },
27
27
  },
28
28
  parseDOM: [
29
29
  {
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": "1.4.4-LEAN-2737",
4
+ "version": "1.4.4-LEAN-2737-1",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-transform",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",