Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix tsc

Manav Rathib88d6d26a64f
diff --git a/web/packages/new/photos/services/ffmpeg/index.ts b/web/packages/new/photos/services/ffmpeg/index.ts
index 2d29c5ad9b..578f74cceb 100644
--- a/web/packages/new/photos/services/ffmpeg/index.ts
+++ b/web/packages/new/photos/services/ffmpeg/index.ts
@@ -195,17 +195,17 @@ function parseFFmpegExtractedMetadata(encodedMetadata: Uint8Array) {
return parsedMetadata;
}
-function parseAppleISOLocation(isoLocation: string) {
+const parseAppleISOLocation = (isoLocation: string | undefined) => {
let location = { ...NULL_LOCATION };
if (isoLocation) {
- const [latitude, longitude] = isoLocation
+ const m = isoLocation
.match(/(\+|-)\d+\.*\d+/g)
- .map((x) => parseFloat(x));
+ ?.map((x) => parseFloat(x));
- location = { latitude, longitude };
+ location = { latitude: m?.at(0) ?? null, longitude: m?.at(1) ?? null };
}
return location;
-}
+};
function parseCreationTime(creationTime: string) {
let dateTime = null;