Skip to content

Commit

Permalink
fix(map): prevent exception when no area lights exist for a given map
Browse files Browse the repository at this point in the history
  • Loading branch information
fallenoak committed Jan 14, 2024
1 parent 6bcec60 commit 064c107
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/map/light/MapLight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class MapLight extends SceneLight {
}

#selectLights(position: THREE.Vector3) {
if (!this.#lights || this.#mapId === undefined) {
if (!this.#lights || this.#mapId === undefined || !this.#lights[this.#mapId]) {
return;
}

Expand Down

0 comments on commit 064c107

Please sign in to comment.