From 19964498f3b66a1c98da29c92f3f3f7532fd4d9e Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 18 Feb 2013 20:38:32 +0000 Subject: [PATCH] no need to parse already parsed json --- bin/extractPadData.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/extractPadData.js b/bin/extractPadData.js index 4210e18d..c18af5b0 100644 --- a/bin/extractPadData.js +++ b/bin/extractPadData.js @@ -83,7 +83,10 @@ async.series([ db.db.db.wrappedDB.get(dbkey, function(err, dbvalue) { if(err) { callback(err); return} - dbvalue=JSON.parse(dbvalue); + + if(typeof dbvalue != 'object'){ + dbvalue=JSON.parse(dbvalue); // if its not json then parse it as json + } dirty.set(dbkey, dbvalue, callback); });