Skip to content

Commit

Permalink
fix: check if object
Browse files Browse the repository at this point in the history
  • Loading branch information
Unitech authored and Eywek committed Jul 16, 2018
1 parent dd9d83d commit e87d14f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/InteractorDaemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ const InteractorDaemon = module.exports = class InteractorDaemon {
})
}

if (result.error == true && result.active == false) {
if (result && typeof(result) === 'object' &&
result.error == true && result.active == false) {
log(`Error when connecting: ${result.msg}`)
return this.exit(new Error(`Error when connecting: ${result.msg}`))
}
Expand Down

0 comments on commit e87d14f

Please sign in to comment.