Skip to content

Commit

Permalink
Merge pull request #2084 from iNavFlight/dzikuvx-fix-gps-crash
Browse files Browse the repository at this point in the history
Hopefully this fixes crash on GPS tab
  • Loading branch information
DzikuVx authored May 18, 2024
2 parents 48fa44e + afc097f commit 71817af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tabs/gps.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ TABS.gps.initialize = function (callback) {
var feature = mapHandler.forEachFeatureAtPixel(mapHandler.getEventPixel(evt.originalEvent), function(feature, layer) {
return feature;
});

if (feature) {
if (feature && feature.get('data') && feature.get('name')) {
TABS.gps.toolboxAdsbVehicle.setContent(
`icao: <strong>` + feature.get('name') + `</strong><br />`
+ `lat: <strong>`+ (feature.get('data').lat / 10000000) + `</strong><br />`
Expand Down

0 comments on commit 71817af

Please sign in to comment.