Skip to content

armgit / ente

Public Imported from GitHub
0

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

remove unneeded non null assertion

Abhinav142f485a4ad0
diff --git a/apps/photos/src/services/locationSearchService.ts b/apps/photos/src/services/locationSearchService.ts
index 2141c81ef3..48d28654a3 100644
--- a/apps/photos/src/services/locationSearchService.ts
+++ b/apps/photos/src/services/locationSearchService.ts
@@ -65,10 +65,10 @@ function isLocationCloseToPoint(
location: Location,
radius: number
) {
- const a = (radius * _scaleFactor(centerPoint.latitude!)) / KMS_PER_DEGREE;
+ const a = (radius * _scaleFactor(centerPoint.latitude)) / KMS_PER_DEGREE;
const b = radius / KMS_PER_DEGREE;
- const x = centerPoint.latitude! - location.latitude!;
- const y = centerPoint.longitude! - location.longitude!;
+ const x = centerPoint.latitude - location.latitude;
+ const y = centerPoint.longitude - location.longitude;
if ((x * x) / (a * a) + (y * y) / (b * b) <= 1) {
return true;
}