Permalink
Browse files

fix(server): check before invocation on db.close()

  • Loading branch information...
mycoboco committed Aug 17, 2018
1 parent 7f3d359 commit 8ee3a8786cde98d083a5e7eba3f111a76bc3c3d2
Showing with 1 addition and 1 deletion.
  1. +1 −1 server/server.js
View
@@ -57,7 +57,7 @@ function exit() {
if (typeof service.kill === 'function') service.kill()
else if (typeof service.stop === 'function') service.stop()
}
db && db.close()
db && typeof db.close === 'function' && db.close()
process.exit(0)
}

0 comments on commit 8ee3a87

Please sign in to comment.