From 6a058b690b8e599d6a0ab5f98a24d7001ad24d7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 16 Apr 2015 18:13:47 +0300 Subject: [PATCH] Allow unset topics in posts too. --- lib/web3/formatters.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/web3/formatters.js b/lib/web3/formatters.js index 4388f64..22a828b 100644 --- a/lib/web3/formatters.js +++ b/lib/web3/formatters.js @@ -159,6 +159,9 @@ var inputPostFormatter = function(post) { post.priority = utils.fromDecimal(post.priority); // fallback + if (post.topics == undefined) { + post.topics = [] + } if (!utils.isArray(post.topics)) { post.topics = [post.topics]; }