Skip to content

Commit

Permalink
Add check for firestore document properties
Browse files Browse the repository at this point in the history
  • Loading branch information
rtomitani committed Jun 1, 2022
1 parent cacd106 commit 79cb3f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/NounsMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ export default defineComponent({
lng,
visibility: true
});
if (!isNaN(lat) && !isNaN(lng)) {
if (lat != null && lng != null) {
mapObj.value.setCenter(new mapInstance.value.maps.LatLng(lat, lng));
}
if (!isNaN(zoom)) {
if (zoom != null) {
mapObj.value.setZoom(zoom);
}
}
Expand Down

0 comments on commit 79cb3f6

Please sign in to comment.