From 34a4a2103f3a336f63779a8704e75faa69d1864c Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sat, 6 Sep 2014 03:45:34 -0400 Subject: [PATCH] isNan check --- src/topics.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/topics.js b/src/topics.js index 7145cd9f68..a828047cfc 100644 --- a/src/topics.js +++ b/src/topics.js @@ -244,7 +244,10 @@ var async = require('async'), }; Topics.getTopicWithPosts = function(tid, set, uid, start, end, reverse, callback) { - + if (isNaN(start) || isNaN(end)) { + var e = new Error('TOO LARGE'); + winston.warn('IS_NAN_CHECK set, start, end, uid, tid', set, start, end, uid, tid, e.stack); + } Topics.getTopicData(tid, function(err, topicData) { if (err || !topicData) { return callback(err || new Error('[[error:no-topic]]'));