Clone
This commit is contained in:
parent
b93638e354
commit
390f628557
|
@ -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 };
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -713,7 +713,7 @@ const extractImageOrVideoMetadata = async (
|
|||
};
|
||||
|
||||
const NULL_EXTRACTED_METADATA: ParsedExtractedMetadata = {
|
||||
location: NULL_LOCATION,
|
||||
location: { ...NULL_LOCATION },
|
||||
creationTime: null,
|
||||
width: null,
|
||||
height: null,
|
||||
|
|
Loading…
Reference in a new issue