From d97af5020abe9f6cb157f552a54c9a64122283a4 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 30 Jul 2014 18:40:00 -0400 Subject: [PATCH] small cleanup to postSummary --- src/plugins.js | 2 +- src/posts.js | 28 +++++++--------------------- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/src/plugins.js b/src/plugins.js index 5ca41bd353..669c3e65b1 100644 --- a/src/plugins.js +++ b/src/plugins.js @@ -263,7 +263,7 @@ var fs = require('fs'), async.each(languages, function(pathToLang, next) { fs.readFile(pathToLang, function(err, file) { try { - var json = JSON.parse(file.toString()); + var json = JSON.parse(file.toString()); } catch (err) { winston.error('[plugins] Unable to parse custom language file: ' + pathToLang + '\r\n' + err.stack); return next(err); diff --git a/src/posts.js b/src/posts.js index 749adca82f..c7861c8364 100644 --- a/src/posts.js +++ b/src/posts.js @@ -338,19 +338,15 @@ var async = require('async'), results.topics = toObject('tid', results.topicsAndCategories.topics); results.categories = toObject('cid', results.topicsAndCategories.categories); - for(var i=0; i