Skip to content

Commit

Permalink
Merge pull request #454 from cidgoh/fix_failed_checks
Browse files Browse the repository at this point in the history
Fix failed checks on master
  • Loading branch information
ddooley authored Dec 17, 2024
2 parents 9273db6 + 7524716 commit ca25689
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
24 changes: 17 additions & 7 deletions lib/DataHarmonizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1757,17 +1757,27 @@ class DataHarmonizer {

// if sources exist, fetch transformed Value
if (field.sources) {
if (field.multivalued === true) { //Map list of semicolon-delimited choices
if (field.multivalued === true) {
// Map list of semicolon-delimited choices
// ISSUE: relying on semicolon delimiter in input
for (let cellVal of mappedCellVal.split(';')) {
mappedCell.push( self.getTransformedField(headerName, cellVal.trim(), field, prefix));
mappedCell.push(
self.getTransformedField(
headerName,
cellVal.trim(),
field,
prefix
)
);
}
} else {
// Map single choice
mappedCell.push(
self.getTransformedField(headerName, mappedCellVal, field, prefix)
);
}
else { // Map single choice
mappedCell.push(self.getTransformedField(headerName, mappedCellVal, field, prefix));
}
}
else { // No mapping.
} else {
// No mapping.
mappedCell.push(mappedCellVal);
}
}
Expand Down
4 changes: 1 addition & 3 deletions lib/Validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ class Validator {
this.#valueValidatorMap = new Map();
}


/* This returns a single primitve data type for a slot - a decimal, date,
string etc. or possibly an enumeration. Enumerations are handled
separately however (by const slotEnum = ...). Slots either use "range"
Expand All @@ -150,7 +149,6 @@ class Validator {
may be undefined if that is a menu too.
*/
getSlotType(slotDefinition) {

var slotType = this.#schema.types?.[slotDefinition.range];

if (slotType === undefined) {
Expand All @@ -163,7 +161,7 @@ class Validator {
}
}

return slotType
return slotType;
}

getValidatorForSlot(slot, options = {}) {
Expand Down

0 comments on commit ca25689

Please sign in to comment.