Skip to content

Commit a2e43cc

Browse files
Type simulationState as union and remove await on sync call
simulationState was inferred as plain string — now typed as "idle" | "running" | "completed" | "failed" to catch typos at compile time. Also removed misleading await on randanimalSync(). Fixes meshtastic#54, meshtastic#55. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 806b142 commit a2e43cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/store.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const useStore = defineStore("store", {
3434
currentMarker: undefined as undefined | L.Marker,
3535
localSites: [] as Site[],
3636
overlapLayer: undefined as undefined | L.GridLayer,
37-
simulationState: "idle",
37+
simulationState: "idle" as "idle" | "running" | "completed" | "failed",
3838
simulationError: "" as string,
3939
isAdmin: false,
4040
adminToken: localStorage.getItem("adminToken") ?? "",
@@ -687,7 +687,7 @@ const useStore = defineStore("store", {
687687
visible: true,
688688
});
689689
this.currentMarker?.removeFrom(this.map as L.Map);
690-
this.splatParams.transmitter.name = await randanimalSync();
690+
this.splatParams.transmitter.name = randanimalSync();
691691
this.redrawSites();
692692
this.updateOverlapLayer();
693693
// Reload tower paths after backend has time to compute

0 commit comments

Comments
 (0)