check if there is follow element

This commit is contained in:
Baris Soner Usakli
2013-08-16 17:04:08 -04:00
parent 6690f49c4e
commit 00cb15d3c8
2 changed files with 9 additions and 4 deletions

View File

@@ -230,6 +230,9 @@ var express = require('express'),
var posts = topicData.posts.push(topicData.main_posts[0]),
lastMod = 0,
timestamp;
console.log(topicData.main_posts);
for(var x=0,numPosts=topicData.posts.length;x<numPosts;x++) {
timestamp = parseInt(topicData.posts[x].timestamp, 10);
if (timestamp > lastMod) lastMod = timestamp;