We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eabc5b0 commit 79bbf1dCopy full SHA for 79bbf1d
proxy/js/features.mjs
@@ -17,8 +17,7 @@ const electrification_signals = all_signals.features.filter(feature => feature.t
17
// TODO add links to documentation
18
19
const requireUniqueEntries = array => {
20
- const count = Object.groupBy(array, it => it[0]);
21
- delete count['']; // icons with no name are used for icon composition
+ const count = Object.groupBy(array.filter(it => it[0]), it => it[0]);
22
if (Object.values(count).some(it => it.length > 1)) {
23
const offendingEntries = Object.entries(count).filter(it => it[1].length > 1).map(it => it[0]).join(', ');
24
throw new Error(`entries must be unique, offending entries: ${offendingEntries}`);
0 commit comments