Fix filter data crashing when data contains non string values
It may happen when data comes from an import. fix #1377
This commit is contained in:
parent
45c1d1c419
commit
9434744219
1 changed files with 3 additions and 2 deletions
|
@ -478,8 +478,9 @@ L.U.FeatureMixin = {
|
||||||
|
|
||||||
matchFilter: function (filter, keys) {
|
matchFilter: function (filter, keys) {
|
||||||
filter = filter.toLowerCase()
|
filter = filter.toLowerCase()
|
||||||
for (let i = 0; i < keys.length; i++) {
|
for (let i = 0, value; i < keys.length; i++) {
|
||||||
if ((this.properties[keys[i]] || '').toLowerCase().indexOf(filter) !== -1)
|
value = (this.properties[keys[i]] || '') + ''
|
||||||
|
if (value.toLowerCase().indexOf(filter) !== -1)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in a new issue