Only add 'toc' if not already defined

This commit is contained in:
Fred Boniface 2024-11-10 19:04:27 +00:00
parent 5e0de0065b
commit fbfb97f71f

View File

@ -39,7 +39,7 @@ function sortAndMergeYAMLFiles() {
if (item.stops.length > 0) {
outputString += ` - code: "${item.code}"\n`;
outputString += ` stops: [${item.stops.map(stop => `${stop}`).join(',')}]\n`;
outputString += ` toc: "gw"\n`;
outputString += ` toc: "${item.toc || "gw"}"\n`;
}
});