forked from MapComplete/MapComplete
Refactoring: automatically generate code files from layer/theme files to avoid using 'Eval'
This commit is contained in:
parent
865b0bc44f
commit
39944a01fb
17 changed files with 269 additions and 31 deletions
|
@ -204,12 +204,6 @@ export default class LayerConfig extends WithContextLoader {
|
|||
}
|
||||
const code = kv.substring(index + 1)
|
||||
|
||||
try {
|
||||
new Function("feat", "return " + code + ";")
|
||||
} catch (e) {
|
||||
throw `Invalid function definition: the custom javascript is invalid:${e} (at ${context}). The offending javascript code is:\n ${code}`
|
||||
}
|
||||
|
||||
this.calculatedTags.push([key, code, isStrict])
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue