Skip to content

Commit e5d16db

Browse files
committed
tidying
1 parent a5251b6 commit e5d16db

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/DataHarmonizer.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ class DataHarmonizer {
254254
attributes[name],
255255
this.context.template.current.schema.slots[name]
256256
);
257-
// console.log(field);
258257

259258
//let field = attributes[name];
260259
let section_title = null;
@@ -579,7 +578,7 @@ class DataHarmonizer {
579578
// signaling changes.
580579
await this.doPreValidationRepairs(data); // Screen refresh requires await().
581580
this.invalid_cells = this.getInvalidCells(data);
582-
console.log("INVALID CELLS", this.invalid_cells);
581+
//console.log("INVALID CELLS", this.invalid_cells);
583582
this.hot.render();
584583
}
585584

@@ -2656,6 +2655,7 @@ class DataHarmonizer {
26562655
if (number >= 0) {
26572656
// Here we have the 3 field call, with units sandwitched in the middle
26582657
if (binOffset === 2) {
2658+
26592659
const unit = matrix[row][hotRowNextCol];
26602660
// Host age unit is interpreted by default to be year.
26612661
// If user selects month, value is converted into years for binning.
@@ -2691,8 +2691,9 @@ class DataHarmonizer {
26912691
selection = bin_value; // Default value is itself.
26922692

26932693
const bin_values = fields[hotRowBinCol].flatVocabulary;
2694-
if (!bin_value || (bin_value === '' && value in bin_values)) {
2694+
if (value in bin_values && (!bin_value || bin_value === '')) {
26952695
selection = value;
2696+
console.log("no bin value", value);
26962697
}
26972698
// If a unit field exists, then set that to metadata too.
26982699
if (binOffset == 2) {
@@ -2701,7 +2702,7 @@ class DataHarmonizer {
27012702
? matrix[hotRowPtr][hotRowNextCol]
27022703
: null;
27032704
const unit_values = fields[col + 1].flatVocabulary;
2704-
if (!unit_value || (unit_value === '' && value in unit_values)) {
2705+
if (value in unit_values && (!unit_value || unit_value === '')) {
27052706
triggered_changes.push([
27062707
hotRowPtr,
27072708
hotRowNextCol,

0 commit comments

Comments
 (0)