Skip to content

Commit

Permalink
Sometimes navigation.position contains invalid values
Browse files Browse the repository at this point in the history
  • Loading branch information
bergie committed Oct 29, 2024
1 parent c61695b commit 7b9fa7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugin/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ module.exports = function stateToEntry(state, text, author = '') {
};
if (state['navigation.position']) {
data.position = {
...state['navigation.position'],
latitude: state['navigation.position'].latitude,
longitude: state['navigation.position'].longitude,
};
}
if (state['navigation.gnss.type'] && data.position) {
Expand Down

0 comments on commit 7b9fa7b

Please sign in to comment.