diff --git a/src/pages/Map/index.tsx b/src/pages/Map/index.tsx
index 55e6e3b5..47628033 100644
--- a/src/pages/Map/index.tsx
+++ b/src/pages/Map/index.tsx
@@ -57,16 +57,15 @@ export const MapPage = (): JSX.Element => {
marginLeft="auto"
size="small"
onClick={() => {
- console.log("clicked");
- console.log(map);
-
- map?.flyTo({
- center: [
- n.data.position?.latitudeI / 1e7,
- n.data.position?.longitudeI / 1e7,
- ],
- zoom: 10,
- });
+ if (n.data.position?.latitudeI) {
+ map?.flyTo({
+ center: [
+ n.data.position.longitudeI / 1e7,
+ n.data.position.latitudeI / 1e7,
+ ],
+ zoom: 10,
+ });
+ }
}}
/>
@@ -90,22 +89,20 @@ export const MapPage = (): JSX.Element => {
))}
- {nodes
- .filter((n) => n.data.position?.latitudeI)
- .map((n) => {
- if (n.data.position?.latitudeI) {
- return (
-
-
-
- );
- }
- })}
+ {nodes.map((n) => {
+ if (n.data.position?.latitudeI) {
+ return (
+
+
+
+ );
+ }
+ })}
);