Skip to content

Commit 7397384

Browse files
committed
Sonar
1 parent c27cc7f commit 7397384

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

src/client/javascripts/geospatial-map.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ function getAllowedTypesPhrase(allowPoint, allowLine, allowShape) {
6767
items.push('shapes')
6868
}
6969

70-
if (items.length === 0) {
71-
return ''
72-
}
73-
7470
return formatDelimtedList(items, ',', 'or')
7571
}
7672

src/client/javascripts/utils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ export function formatDelimtedList(items, separator, lastSpearator) {
1818
}
1919

2020
const last = items.pop()
21-
return `${items.join(`${separator} `)} ${lastSpearator} ${last}`
21+
const separatorAndSpace = `${separator} `
22+
return `${items.join(separatorAndSpace)} ${lastSpearator} ${last}`
2223
}

0 commit comments

Comments
 (0)