check-bot-balance: Fix error when loading if no account object is configured
This commit is contained in:
parent
10a4b98d01
commit
c53e3fbf89
|
@ -20,7 +20,7 @@ const minWarningAgeInMillisecs = 24 * 60 * 60 * 1000
|
|||
var isCheckingBalance = false
|
||||
|
||||
module.exports = robot => {
|
||||
if (!options || options.accounts.length === 0) {
|
||||
if (!options || !options.accounts || options.accounts.length === 0) {
|
||||
robot.log.debug(`${botName} - No accounts counfigured. Disabling script`)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue