From 122b8e42f93c57d81cca181bc46f89df16c6ab02 Mon Sep 17 00:00:00 2001 From: Enrico Fasoli Date: Sun, 15 Nov 2015 21:10:58 +0100 Subject: [PATCH] added another error check --- lib/boards-api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/boards-api.js b/lib/boards-api.js index abfdcae..37d35fb 100644 --- a/lib/boards-api.js +++ b/lib/boards-api.js @@ -272,7 +272,7 @@ BoardsAPI.prototype.init = function(done){ console.log('Error while calculating version hash:',err) done(err) } else { - this.version_hash = r[0].Hash + if(r && r[0] && r[0].Hash) this.version_hash = r[0].Hash console.log('Version hash is',this.version_hash) done(null) }