no need to parse already parsed json

This commit is contained in:
John McLear 2013-02-18 20:38:32 +00:00
parent f76cfad42b
commit 19964498f3

View file

@ -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);
});