Skip to content

Commit ccde9a2

Browse files
Move map initialization from Transmitter.vue to App.vue
Transmitter is conditionally rendered (v-if="store.isAdmin"), so visitors never got a map. Map init belongs in the always- mounted App.vue. Fixes meshtastic#48. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6227843 commit ccde9a2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/App.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,16 +234,16 @@ import { useStore } from "./store.ts";
234234
const store = useStore();
235235
236236
onMounted(() => {
237+
store.initMap();
237238
void store.checkAuth();
238239
});
239240
const buttonText = () => {
240241
if ("running" === store.simulationState) {
241242
return "Running";
242243
} else if ("failed" === store.simulationState) {
243244
return "Failed";
244-
}
245-
return "Run Simulation";
246-
245+
}
246+
return "Run Simulation";
247247
};
248248
</script>
249249

src/components/Transmitter.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ onMounted(() => {
365365
trigger: "manual",
366366
});
367367
}
368-
store.initMap();
368+
// Map is initialized in App.vue onMounted, not here
369369
});
370370
371371
onUnmounted(() => {

0 commit comments

Comments
 (0)