so spaces and tabs are totally differnt...whitespace fixes
This commit is contained in:
@ -139,16 +139,15 @@ exports.returnIndividualStory = function(req, res, next) {
|
|||||||
|
|
||||||
var userVoted = false;
|
var userVoted = false;
|
||||||
try {
|
try {
|
||||||
var votedObj = story.upVotes.filter(function(a){
|
var votedObj = story.upVotes.filter(function(a){
|
||||||
return a['upVotedByUsername'] === req.user['profile']['username'];
|
return a['upVotedByUsername'] === req.user['profile']['username'];
|
||||||
})
|
})
|
||||||
|
if (votedObj.length > 0){
|
||||||
if (votedObj.length > 0){
|
userVoted = true;
|
||||||
userVoted = true;
|
}
|
||||||
}
|
} catch(err){
|
||||||
} catch(err){
|
userVoted = false;
|
||||||
userVoted = false;
|
}
|
||||||
}
|
|
||||||
res.render('stories/index', {
|
res.render('stories/index', {
|
||||||
title: story.headline,
|
title: story.headline,
|
||||||
link: story.link,
|
link: story.link,
|
||||||
|
@ -121,7 +121,7 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
var upvoteHandler = function () {
|
var upvoteHandler = function () {
|
||||||
$(".ion-arrow-up-b").hide();
|
$(".ion-arrow-up-b").hide();
|
||||||
var _id = storyId;
|
var _id = storyId;
|
||||||
$('#upvote').unbind('click');
|
$('#upvote').unbind('click');
|
||||||
var alreadyUpvoted = false;
|
var alreadyUpvoted = false;
|
||||||
for (var i = 0; i < upVotes.length; i++) {
|
for (var i = 0; i < upVotes.length; i++) {
|
||||||
|
Reference in New Issue
Block a user