mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-22 12:36:29 +00:00
fix: crash if trying to view game without being a player
This commit is contained in:
@@ -387,8 +387,9 @@ export class NameLayer implements Layer {
|
||||
|
||||
const existingEmbargo = iconsDiv.querySelector('[data-icon="embargo"]');
|
||||
const hasEmbargo =
|
||||
render.player.hasEmbargoAgainst(myPlayer) ||
|
||||
myPlayer.hasEmbargoAgainst(render.player);
|
||||
myPlayer &&
|
||||
(render.player.hasEmbargoAgainst(myPlayer) ||
|
||||
myPlayer.hasEmbargoAgainst(render.player));
|
||||
if (myPlayer && hasEmbargo) {
|
||||
if (!existingEmbargo) {
|
||||
iconsDiv.appendChild(
|
||||
|
||||
Reference in New Issue
Block a user