summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2018-01-06 14:01:00 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2018-01-06 14:01:00 +0100
commit1a98e5757ed9a4ac7e088c999ae8775d8acb6fc9 (patch)
tree53a30a3000dc5a19451604708ad0db01932ee525
parent4842ad9efec880ec4a190503893aba5f5b0a9b81 (diff)
downloadbridge-1a98e5757ed9a4ac7e088c999ae8775d8acb6fc9.tar.gz
bridge-1a98e5757ed9a4ac7e088c999ae8775d8acb6fc9.zip
hotfix for crash on brawls crunch
-rw-r--r--service_crunch.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/service_crunch.js b/service_crunch.js
index 55a1bb1..8fd91f7 100644
--- a/service_crunch.js
+++ b/service_crunch.js
@@ -125,6 +125,8 @@ module.exports = class Cruncher extends Service {
async crunchGlobal(db_identifier, queue_identifier="") {
const db = this.getDatabase(db_identifier),
key_name = "global_last_crunch_participant_id" + queue_identifier;
+ if (db == undefined) return;
+
// get lcpid from keys table
let last_crunch_participant_id = await this.getKey(db_identifier, key_name, 0);