From 5be6d0d724bf4a85cbcb39e4f1c11f26ce81da23 Mon Sep 17 00:00:00 2001 From: Chris Kleeschulte Date: Mon, 9 Oct 2017 09:49:31 -0400 Subject: [PATCH] Fixed response for not returning a header. --- lib/blocks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/blocks.js b/lib/blocks.js index 82da845..418beee 100644 --- a/lib/blocks.js +++ b/lib/blocks.js @@ -175,7 +175,7 @@ BlockController.prototype.blockIndex = function(req, res) { var self = this; var height = req.params.height; self._header.getBlockHeader(parseInt(height), function(err, info) { - if (err) { + if (err || !info) { return self.common.handleErrors(err, res); } res.jsonp({