Skip to content

Commit 7524716

Browse files
committed
Prettier
1 parent 9273db6 commit 7524716

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

lib/DataHarmonizer.js

+17-7
Original file line numberDiff line numberDiff line change
@@ -1757,17 +1757,27 @@ class DataHarmonizer {
17571757

17581758
// if sources exist, fetch transformed Value
17591759
if (field.sources) {
1760-
if (field.multivalued === true) { //Map list of semicolon-delimited choices
1760+
if (field.multivalued === true) {
1761+
// Map list of semicolon-delimited choices
17611762
// ISSUE: relying on semicolon delimiter in input
17621763
for (let cellVal of mappedCellVal.split(';')) {
1763-
mappedCell.push( self.getTransformedField(headerName, cellVal.trim(), field, prefix));
1764+
mappedCell.push(
1765+
self.getTransformedField(
1766+
headerName,
1767+
cellVal.trim(),
1768+
field,
1769+
prefix
1770+
)
1771+
);
17641772
}
1773+
} else {
1774+
// Map single choice
1775+
mappedCell.push(
1776+
self.getTransformedField(headerName, mappedCellVal, field, prefix)
1777+
);
17651778
}
1766-
else { // Map single choice
1767-
mappedCell.push(self.getTransformedField(headerName, mappedCellVal, field, prefix));
1768-
}
1769-
}
1770-
else { // No mapping.
1779+
} else {
1780+
// No mapping.
17711781
mappedCell.push(mappedCellVal);
17721782
}
17731783
}

lib/Validator.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ class Validator {
140140
this.#valueValidatorMap = new Map();
141141
}
142142

143-
144143
/* This returns a single primitve data type for a slot - a decimal, date,
145144
string etc. or possibly an enumeration. Enumerations are handled
146145
separately however (by const slotEnum = ...). Slots either use "range"
@@ -150,7 +149,6 @@ class Validator {
150149
may be undefined if that is a menu too.
151150
*/
152151
getSlotType(slotDefinition) {
153-
154152
var slotType = this.#schema.types?.[slotDefinition.range];
155153

156154
if (slotType === undefined) {
@@ -163,7 +161,7 @@ class Validator {
163161
}
164162
}
165163

166-
return slotType
164+
return slotType;
167165
}
168166

169167
getValidatorForSlot(slot, options = {}) {

0 commit comments

Comments
 (0)