diff --git a/helper/labelGenerator.js b/helper/labelGenerator.js index 1938232d..e562916b 100644 --- a/helper/labelGenerator.js +++ b/helper/labelGenerator.js @@ -7,12 +7,8 @@ module.exports = function( record ){ var labelParts = [ record.name.default ]; - var schema = schemas.default; - - if (record.country_a && record.country_a.length && schemas[record.country_a]) { - schema = schemas[record.country_a]; - } - + var schema = getSchema(record.country_a); + var buildOutput = function(parts, schemaArr, record) { for (var i=0; i