diff --git a/src/store/mutations.ts b/src/store/mutations.ts index 9f8fc04..887257c 100644 --- a/src/store/mutations.ts +++ b/src/store/mutations.ts @@ -413,10 +413,15 @@ export const mutations: MutationTree & Mutations = { const newWorld = state.worlds.get(worldName); if(state.currentWorld !== newWorld) { - state.currentWorld = state.worlds.get(worldName); + state.currentWorld = newWorld; state.markerSets.clear(); state.pendingMarkerUpdates.splice(0); state.pendingTileUpdates.splice(0); + + // Cancel follow when switching to a different world + if(state.followTarget && state.followTarget.location.world !== newWorld!.name) { + state.followTarget = undefined; + } } state.currentMap = state.maps.get(mapName);