Some fixes in the rewrite of the maprendering

This commit is contained in:
Pieter Vander Vennet 2022-03-08 01:05:54 +01:00
parent 9f3a23843c
commit 67c8d08f3e
9 changed files with 117 additions and 19 deletions

View file

@ -94,7 +94,15 @@ export default class Translations {
if(typeof transl !== "object"){
return false;
}
if(Object.keys(transl).length == 0){
// No translations found; not a translation
return false
}
// is a weird key found?
return !Object.keys(transl).some(key => !this.knownLanguages.has(key))
if(Object.keys(transl).some(key => !this.knownLanguages.has(key))){
return false
}
return true;
}
}