Avoid ??= for now, it's extremely new

This commit is contained in:
Eevee (Evelyn Woods) committed 2020-09-20 00:30:07 -06:00
1 parent 72a44429af
commit c8a24d0e4b
1 file changed
+3 -3
+3 -3
View File
@@ -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());
}