@iebh/reflib 2.5.1 → 2.5.3
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/modules/ris.js +1 -1
- package/package.json +1 -1
package/modules/ris.js
CHANGED
|
@@ -163,7 +163,7 @@ export function parseRef(refString, settings) {
|
|
|
163
163
|
ref[fieldLookup.rl] = translations.types.rawMap.get(parsedLine.value)?.rl || settings.defaultType;
|
|
164
164
|
lastField = fieldLookup; // Track last key so we can append to it on the next cycle
|
|
165
165
|
} else if (fieldLookup.inputArray) { // Should this `rl` key be treated like an appendable array?
|
|
166
|
-
if (!ref[fieldLookup.rl]) { // Array doesn't exist yet
|
|
166
|
+
if (!ref[fieldLookup.rl] || !Array.isArray(ref[fieldLookup.rl])) { // Array doesn't exist yet
|
|
167
167
|
ref[fieldLookup.rl] = [parsedLine.value];
|
|
168
168
|
} else {
|
|
169
169
|
ref[fieldLookup.rl].push(parsedLine.value);
|