Skip to content

Commit

Permalink
Check active world hasn't changed while waiting for markers to load (f…
Browse files Browse the repository at this point in the history
…ixes #29)
  • Loading branch information
jpenilla committed Feb 11, 2022
1 parent 525f506 commit 3450115
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion common/src/main/resources/web/js/modules/util/World.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ class World {
// load and draw markers
if (P.tick_count % this.marker_update_interval == 0) {
P.getJSON(`tiles/${this.name}/markers.json`, (json) => {
this.markers(json);
if (this === P.worldList.curWorld) {
this.markers(json);
}
});
}
}
Expand Down

0 comments on commit 3450115

Please sign in to comment.