Skip to content

Commit 47cf1f2

Browse files
committed
fix: prevent error
1 parent 3a6f0e0 commit 47cf1f2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/index.android.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ export function nativeImageProperty(...args) {
8989

9090
export function mapPosVectorFromArgs<T = DefaultLatLonKeys>(positions: MapPosVector<T> | GenericMapPos<T>[], ignoreAltitude = true) {
9191
let nativePoses: com.carto.core.MapPosVector;
92+
if (!positions) {
93+
return null;
94+
}
9295
if (typeof (positions as any).getNative === 'function') {
9396
nativePoses = (positions as MapPosVector<T>).getNative();
9497
} else {

0 commit comments

Comments
 (0)