From c8a24d0e4b89f39db8739fd82cf02b90b414ec1e Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Sun, 20 Sep 2020 00:30:07 -0600 Subject: [PATCH] Avoid ??= for now, it's extremely new --- js/game.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/game.js b/js/game.js index 8f17337..5ab31c0 100644 --- a/js/game.js +++ b/js/game.js @@ -1005,14 +1005,14 @@ export class Level { let type = TILE_TYPES[name]; if (type.is_key) { - actor.keyring ??= {}; - actor.keyring[name] ??= 0; + actor.keyring ||= {}; + actor.keyring[name] ||= 0; actor.keyring[name] += 1; this.pending_undo.push(() => actor.keyring[name] -= 1); } else { // tool, presumably - actor.toolbelt ??= []; + actor.toolbelt ||= []; actor.toolbelt.push(name); this.pending_undo.push(() => actor.toolbelt.pop()); }