diff --git a/web/packages/new/photos/services/exif.ts b/web/packages/new/photos/services/exif.ts index dfe6cebe08..2a71ac4e84 100644 --- a/web/packages/new/photos/services/exif.ts +++ b/web/packages/new/photos/services/exif.ts @@ -86,6 +86,17 @@ export const parseExif = (tags: RawExifTags) => { return metadata; }; +/** + * Parse GPS location from the metadata embedded in the file. + */ +const parseLocation = (tags: RawExifTags) => { + const latitude = tags.gps?.Latitude; + const longitude = tags.gps?.Longitude; + return latitude !== undefined && longitude !== undefined + ? { latitude, longitude } + : undefined; +}; + /** * Parse a single "best" creation date for an image from the metadata embedded * in the file. @@ -364,17 +375,6 @@ const parseIPTCDate = ( return new Date(s); }; -/** - * Parse GPS location from the metadata embedded in the file. - */ -const parseLocation = (tags: RawExifTags) => { - const latitude = tags.gps?.Latitude; - const longitude = tags.gps?.Longitude; - return latitude !== undefined && longitude !== undefined - ? { latitude, longitude } - : undefined; -}; - /** * Parse the width and height of the image from the metadata embedded in the * file.