mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
fix: use default value from schema for non inheritable fields (#2513)
Eg. moreControl
This commit is contained in:
commit
c00de1a457
1 changed files with 6 additions and 2 deletions
|
@ -81,10 +81,14 @@ class BaseElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
get() {
|
get() {
|
||||||
if (!this.properties.inheritable) return this.builder.getter(this.field)
|
let value
|
||||||
const path = this.field.split('.')
|
const path = this.field.split('.')
|
||||||
const key = path[path.length - 1]
|
const key = path[path.length - 1]
|
||||||
const value = this.obj.getOption(key)
|
if (!this.properties.inheritable) {
|
||||||
|
value = this.builder.getter(this.field)
|
||||||
|
} else {
|
||||||
|
value = this.obj.getOption(key)
|
||||||
|
}
|
||||||
if (value === undefined) return SCHEMA[key]?.default
|
if (value === undefined) return SCHEMA[key]?.default
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue