Avoiding raising errors when there is no elevation in exif data
This commit is contained in:
1 parent
e634d13ee5
commit
3ca64ad7eb
2 files changed
+10
-1
No files matched your search
+3
-1
@@ -21,6 +21,8 @@ export const getGps = (exifObj: any) => {
|
||||
return {
|
||||
latitude: toNumber(1),
|
||||
longitude: toNumber(3),
|
||||
elevation: exifObj.GPS[6][0] / exifObj.GPS[6][1],
|
||||
elevation: exifObj.GPS[6]
|
||||
? exifObj.GPS[6][0] / exifObj.GPS[6][1]
|
||||
: undefined,
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user