forked from MapComplete/MapComplete
Fix tests
This commit is contained in:
parent
284102c2f1
commit
6af3d41886
4 changed files with 16 additions and 22 deletions
|
@ -1,6 +1,7 @@
|
|||
import TagRenderingConfig from "./JSON/TagRenderingConfig";
|
||||
import * as questions from "../assets/tagRenderings/questions.json";
|
||||
import * as icons from "../assets/tagRenderings/icons.json";
|
||||
import {Utils} from "../Utils";
|
||||
|
||||
export default class SharedTagRenderings {
|
||||
|
||||
|
@ -11,8 +12,11 @@ export default class SharedTagRenderings {
|
|||
const dict = new Map<string, TagRenderingConfig>();
|
||||
|
||||
function add(key, store) {
|
||||
if(Utils.runningFromConsole){
|
||||
return;
|
||||
}
|
||||
try {
|
||||
dict.set(key, new TagRenderingConfig(store[key], key))
|
||||
dict.set(key, new TagRenderingConfig(store[key], undefined, `SharedTagRenderings.${key}`))
|
||||
} catch (e) {
|
||||
console.error("BUG: could not parse", key, " from questions.json or icons.json - this error happened during the build step of the SharedTagRenderings", e)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue