Avoid the very new ?. syntax (fixes #56)

This commit is contained in:
Eevee (Evelyn Woods) 2021-03-02 21:38:31 -07:00
parent 5443514583
commit 4cb2afcc74

View File

@ -674,7 +674,7 @@ export class Level extends LevelInterface {
let actor = cell.get_actor(); let actor = cell.get_actor();
let wire_directions = terrain.wire_directions; let wire_directions = terrain.wire_directions;
if ((actor?.wire_directions ?? null !== null) && (actor.movement_cooldown === 0 || this.compat.tiles_react_instantly)) if (actor && actor.wire_directions !== null && (actor.movement_cooldown === 0 || this.compat.tiles_react_instantly))
{ {
wire_directions = actor.wire_directions; wire_directions = actor.wire_directions;
} }