Fix getOption not considering null
values
This commit is contained in:
parent
84a5b3c6f5
commit
bcd9b1ac04
1 changed files with 2 additions and 2 deletions
|
@ -1201,9 +1201,9 @@ L.U.DataLayer = L.Evented.extend({
|
||||||
getOption: function (option, feature) {
|
getOption: function (option, feature) {
|
||||||
if (this.layer && this.layer.getOption) {
|
if (this.layer && this.layer.getOption) {
|
||||||
const value = this.layer.getOption(option, feature)
|
const value = this.layer.getOption(option, feature)
|
||||||
if (value) return value
|
if (typeof value !== 'undefined') return value
|
||||||
}
|
}
|
||||||
if (this.getOwnOption(option)) {
|
if (typeof this.getOwnOption(option) !== 'undefined') {
|
||||||
return this.getOwnOption(option)
|
return this.getOwnOption(option)
|
||||||
} else if (this.layer && this.layer.defaults && this.layer.defaults[option]) {
|
} else if (this.layer && this.layer.defaults && this.layer.defaults[option]) {
|
||||||
return this.layer.defaults[option]
|
return this.layer.defaults[option]
|
||||||
|
|
Loading…
Reference in a new issue