Commit e837a5c8 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Fix dates saved as strings in updates table.

parent 42789ecb
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -351,7 +351,7 @@ var UpdatesTable = (function() {
                    user_id: data.usersMap[u.author].id,
                    comment_id: data.commentsMap[CommentsTable.buildKey(c)].id,
                    action: u.action || 'update',
                    created_at: u.updatedAt
                    created_at: fixDate(u.updatedAt)
                });
            });
        });
@@ -363,6 +363,10 @@ var UpdatesTable = (function() {
        next();
    }

    function fixDate(date) {
        return (typeof date === "string") ? Date.parse(date) : date;
    }

    return {
        extract: extract
    };