Skip to content

Commit

Permalink
Add comment for named waypoint checks
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed Sep 26, 2023
1 parent 4766f96 commit c60c6cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/bit-systems/waypoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ export function waypointSystem(
}
}

// When a scene is opened with a named waypoint we have to make sure that the scene default waypoint
// doesn't override it and that we correctly spawn in the named waypoint from the url.
// https://github.com/mozilla/hubs/issues/2833
const hashUpdated = window.location.hash !== "" && previousWaypointHash !== window.location.hash;
if (hashUpdated && initialSpawnHappened) {
const waypointName = window.location.hash.replace("#", "");
Expand Down

0 comments on commit c60c6cb

Please sign in to comment.