mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
fixing scoring bug
This commit is contained in:
parent
bcd0bdf359
commit
ef6b976c20
1 changed files with 4 additions and 0 deletions
|
@ -12,6 +12,10 @@ updateScore = function (args) {
|
|||
|
||||
// Age Check
|
||||
|
||||
// If for some reason item doesn't have a "postedAt" property, abort
|
||||
if (!item.postedAt)
|
||||
return 0;
|
||||
|
||||
var postedAt = item.postedAt.valueOf();
|
||||
var now = new Date().getTime();
|
||||
var age = now - postedAt;
|
||||
|
|
Loading…
Add table
Reference in a new issue