Skip to content

Commit

Permalink
Fix bot softlocking on start when ownerids array is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
3urobeat committed May 5, 2023
1 parent dfb8052 commit c5c55e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/dataManager/dataProcessing.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Created Date: 27.03.2023 21:34:45
* Author: 3urobeat
*
* Last Modified: 31.03.2023 21:43:48
* Last Modified: 06.05.2023 00:20:32
* Modified By: 3urobeat
*
* Copyright (c) 2023 3urobeat <https://github.com/HerrEurobeat>
Expand Down Expand Up @@ -132,6 +132,9 @@ DataManager.prototype.processData = function() {
}
}

// Instantly bail out if the array is empty. DataCheck will abort the bot later on
if (_this.config.ownerid.length == 0) finishedResponse(-1);

// Either convert to steamID64 or directly push e
_this.config.ownerid.forEach((e, i) => {
if (isNaN(e) || !new SteamID(String(e)).isValid()) {
Expand Down

0 comments on commit c5c55e7

Please sign in to comment.