Skip to content

Commit 71817af

Browse files
authored
Merge pull request #2084 from iNavFlight/dzikuvx-fix-gps-crash
Hopefully this fixes crash on GPS tab
2 parents 48fa44e + afc097f commit 71817af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tabs/gps.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ TABS.gps.initialize = function (callback) {
229229
var feature = mapHandler.forEachFeatureAtPixel(mapHandler.getEventPixel(evt.originalEvent), function(feature, layer) {
230230
return feature;
231231
});
232-
233-
if (feature) {
232+
233+
if (feature && feature.get('data') && feature.get('name')) {
234234
TABS.gps.toolboxAdsbVehicle.setContent(
235235
`icao: <strong>` + feature.get('name') + `</strong><br />`
236236
+ `lat: <strong>`+ (feature.get('data').lat / 10000000) + `</strong><br />`

0 commit comments

Comments
 (0)