check-bot-balance: Fix error when loading if no account object is configured

This commit is contained in:
Pedro Pombeiro 2018-07-03 11:40:44 +02:00
parent 10a4b98d01
commit c53e3fbf89
1 changed files with 1 additions and 1 deletions

View File

@ -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
}