@istex/istex-merge
Advanced tools
Comparing version 2.2.3 to 2.2.4
{ | ||
"name": "@istex/istex-merge", | ||
"version": "2.2.3", | ||
"version": "2.2.4", | ||
"description": "Library to build merged documents and generate Hal TEIs from them.", | ||
@@ -35,2 +35,3 @@ "main": "index.js", | ||
"eslint-plugin-standard": "^5.0.0", | ||
"fs-extra": "^10.1.0", | ||
"mocha": "^9.1.3", | ||
@@ -37,0 +38,0 @@ "rewire": "^3.0.2" |
@@ -29,7 +29,2 @@ const { create } = require('xmlbuilder2'); | ||
// Titles | ||
if (_.isObject(mergedDocument.title)) { | ||
insertTitles(biblFull, mergedDocument); | ||
} | ||
// Authors and their affiliations | ||
@@ -43,2 +38,7 @@ if (isNonEmptyArray(mergedDocument.authors)) { | ||
// Titles | ||
if (_.isObject(mergedDocument.title)) { | ||
insertTitles(biblFull, mergedDocument); | ||
} | ||
// Language | ||
@@ -49,2 +49,5 @@ if (isNonEmptyArray(mergedDocument.language)) { | ||
// Classifications | ||
insertClassifications(biblFull, mergedDocument); | ||
// Abstract | ||
@@ -59,7 +62,6 @@ if (_.isObject(mergedDocument.abstract)) { | ||
// Meeting data | ||
insertMeetingData(biblFull, mergedDocument); | ||
if (_.get(mergedDocument, 'host.conference.name')) { | ||
insertMeetingData(biblFull, mergedDocument); | ||
} | ||
// Classifications | ||
insertClassifications(biblFull, mergedDocument); | ||
return create(xmlDoc).end(options); | ||
@@ -374,5 +376,5 @@ } | ||
let finalClassification; | ||
if (classification?.code) { | ||
if (_.get(classification, 'code')) { | ||
finalClassification = classification; | ||
} else if (enrichedClassification?.code) { | ||
} else if (_.get(enrichedClassification, 'code')) { | ||
finalClassification = enrichedClassification; | ||
@@ -379,0 +381,0 @@ } |
85528
976
11