From 8c7fc7d9648e1930b660d78dfd2a0899a4309e3c Mon Sep 17 00:00:00 2001 From: Kai Volland Date: Thu, 26 Sep 2019 17:55:42 +0200 Subject: [PATCH] Bugfix for vector-tile-selection example Checks if a feature exists before accessing his idProp. --- examples/vector-tile-selection.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/vector-tile-selection.js b/examples/vector-tile-selection.js index 22d5d52676..56c43da2db 100644 --- a/examples/vector-tile-selection.js +++ b/examples/vector-tile-selection.js @@ -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') {