KenEucker / biketag-vue

A vue app for the game of BikeTag played worldwide at biketag.org including the published biketag-vue component library
https://biketag.org
GNU Affero General Public License v3.0
22 stars 13 forks source link

Fix property checking when camera GPS data fails to decode #210

Closed cookieguru closed 8 months ago

cookieguru commented 8 months ago

When a file's GPS EXIF data does not decode properly exifr returns an object with latitude and longitude properties that are both NaN:

Screenshot showing GPSData variable in the debugger is a plain object with properties latitude and longitude, both of which have a value of NaN

Since the code only checks for null, both values are stored. Later, this object is passed to other methods that expect them to be numbers.

This commit eschews the null checks for simple truthy checks since neither NaN nor null are truthy.

what-the-diff[bot] commented 8 months ago

PR Summary

cookieguru commented 8 months ago

Whoops, sorry about that. Forgot to change that when opening the PR. There's a setting where you can change the default branch

KenEucker commented 8 months ago

Oh, I didn't know that was possible. Thanks for the link!

KenEucker commented 8 months ago

:tada: This PR is included in version 1.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: