diff --git a/scripts/merge-yaml.js b/scripts/merge-yaml.js index 86f6f28..3465caa 100644 --- a/scripts/merge-yaml.js +++ b/scripts/merge-yaml.js @@ -36,8 +36,10 @@ function sortAndMergeYAMLFiles() { // Construct the output string let outputString = "pis:\n"; mergedData.forEach(item => { - outputString += ` - code: "${item.code}"\n`; - outputString += ` stops: [${item.stops.map(stop => `${stop}`).join(',')}]\n`; + if (item.stops.length > 0) { + outputString += ` - code: "${item.code}"\n`; + outputString += ` stops: [${item.stops.map(stop => `${stop}`).join(',')}]\n`; + } }); try {