Browse Source

removed debug

pull/461/head
Stephen Hess 9 years ago
parent
commit
5b934b27c3
  1. 2
      helper/labelGenerator.js
  2. 5
      helper/labelSchema.js

2
helper/labelGenerator.js

@ -4,8 +4,6 @@ var _ = require('lodash'),
module.exports = function( record ){
var schema = getSchema(record.country_a);
console.log(schema);
var labelParts = getInitialLabel(record);
for (var key in schema) {

5
helper/labelSchema.js

@ -28,15 +28,10 @@ module.exports = {
// find the first field of record that has a non-empty value that's not already in labelParts
function getFirstProperty(fields) {
return function(record, labelParts) {
console.log(record);
console.log();
for (var i = 0; i < fields.length; i++) {
console.log('considering ' + fields[i]);
var fieldValue = record[fields[i]];
if (check.nonEmptyString(fieldValue) && !_.includes(labelParts, fieldValue)) {
console.log('adding ' + fields[i] + ' value: ' + fieldValue);
labelParts.push( fieldValue );
return labelParts;
}

Loading…
Cancel
Save