This commit is contained in:
Manav Rathi 2024-04-26 10:58:56 +05:30
parent b93638e354
commit 390f628557
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View file

@ -311,7 +311,7 @@ export function parseEXIFLocation(
})}`,
e,
);
return NULL_LOCATION;
return { ...NULL_LOCATION };
}
}
@ -328,7 +328,7 @@ function convertDMSToDD(
export function getEXIFLocation(exifData: ParsedEXIFData): Location {
if (!exifData || (!exifData.latitude && exifData.latitude !== 0)) {
return NULL_LOCATION;
return { ...NULL_LOCATION };
}
return { latitude: exifData.latitude, longitude: exifData.longitude };
}

View file

@ -179,7 +179,7 @@ function parseFFmpegExtractedMetadata(encodedMetadata: Uint8Array) {
}
function parseAppleISOLocation(isoLocation: string) {
let location = NULL_LOCATION;
let location = { ...NULL_LOCATION };
if (isoLocation) {
const [latitude, longitude] = isoLocation
.match(/(\+|-)\d+\.*\d+/g)

View file

@ -713,7 +713,7 @@ const extractImageOrVideoMetadata = async (
};
const NULL_EXTRACTED_METADATA: ParsedExtractedMetadata = {
location: NULL_LOCATION,
location: { ...NULL_LOCATION },
creationTime: null,
width: null,
height: null,