Bugfix for vector-tile-selection example

Checks if a feature exists before accessing his idProp.
This commit is contained in:
Kai Volland
2019-09-26 17:55:42 +02:00
parent 28fb7c5590
commit 8c7fc7d964

View File

@@ -53,6 +53,10 @@ map.on('click', function(event) {
return;
}
const feature = features[0];
if (!feature) {
return;
}
const fid = feature.get(idProp);
if (selectElement.value === 'singleselect') {