bugfix difi + ssb data merge
This commit is contained in:
parent
73e03d193e
commit
b9fc9fd532
|
@ -26,7 +26,8 @@ export const municipalities: Municipality[] = SSBMunicipalities.reduce(
|
|||
function getDifiData(muni: Municipality) {
|
||||
let result = {}
|
||||
DifiMunicipalities.map(difiMuni => {
|
||||
if (difiMuni.title.toLowerCase().indexOf(muni.name.toLowerCase()) !== -1) {
|
||||
const trimmedTitle = difiMuni.title.replace(/kommune/gi, '').trim()
|
||||
if (trimmedTitle.toLowerCase() === muni.name.toLowerCase()) {
|
||||
result = difiMuni
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue