forked from MapComplete/MapComplete
Improvements to studio and layer handling
This commit is contained in:
parent
3166918551
commit
b3b226d34c
6 changed files with 20 additions and 4 deletions
|
|
@ -172,6 +172,7 @@ export abstract class EditJsonState<T> {
|
|||
|
||||
public setValueAt(path: ReadonlyArray<string | number>, v: any) {
|
||||
let entry = this.configuration.data
|
||||
console.trace("Setting value at", path,"to",v)
|
||||
const isUndefined =
|
||||
v === undefined ||
|
||||
v === null ||
|
||||
|
|
|
|||
|
|
@ -147,6 +147,9 @@
|
|||
return { ...<object>v }
|
||||
}
|
||||
if (schema.type === "boolean") {
|
||||
if(v === null || v === undefined){
|
||||
return v
|
||||
}
|
||||
return v === "true" || v === "yes" || v === "1"
|
||||
}
|
||||
if (mightBeBoolean(schema.type)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue