Skip to content

Commit 7819395

Browse files
committed
refactor: simplify geopoint detection
1 parent cc01b84 commit 7819395

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/firestore/utils.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ export function extractRefs(
8383
// Firestore < 4.13
8484
ref instanceof Date ||
8585
ref instanceof Timestamp ||
86-
// TODO: same?
87-
isGeoPoint(ref)
86+
ref instanceof GeoPoint
8887
) {
8988
data[key] = ref
9089
} else if (isDocumentRef(ref)) {
@@ -128,7 +127,3 @@ export function extractRefs(
128127

129128
return dataAndRefs
130129
}
131-
132-
function isGeoPoint(value: unknown): value is GeoPoint {
133-
return isObject(value) && 'latitude' in value && 'longitude' in value
134-
}

0 commit comments

Comments
 (0)