Fix round winner nulling logic

This commit is contained in:
Thomas Smyth 2020-09-15 01:18:04 +01:00
parent fca142eb34
commit 0f3259d14a
2 changed files with 4 additions and 2 deletions

View File

@ -19,6 +19,8 @@ export default {
layer: layer ? layer.layer : null
};
delete logParser.eventStore.WON;
/* Emit new game event */
logParser.server.emit(NEW_GAME, data);
}

View File

@ -9,7 +9,7 @@ export default {
layer: args[4]
};
if (logParser.eventStore.WON) logParser.eventStore.WON = data;
else logParser.eventStore.WON = { ...data, winner: null };
if (logParser.eventStore.WON) logParser.eventStore.WON = { ...data, winner: null };
else logParser.eventStore.WON = data;
}
};