Fix property name check in streetlabels

This commit is contained in:
Markus Koch 2020-05-05 19:44:05 +02:00
parent 3610b8b610
commit 2054d66191

View File

@ -42,8 +42,7 @@ L.StreetLabels = L.LabelTextCollision
_text: function (ctx, layer) { _text: function (ctx, layer) {
if (layer && layer.feature && layer.feature.properties && layer.feature.properties[this.options.propertyName] !== 'undefined') { if (layer && layer.feature && layer.feature.properties && layer.feature.properties[this.options.propertyName] !== undefined) {
if (this.options.showLabelIf) { if (this.options.showLabelIf) {
if (this.options.showLabelIf.call(this, layer.feature) === false) { if (this.options.showLabelIf.call(this, layer.feature) === false) {
return; return;