diff --git a/src/topics/bookmarks.js b/src/topics/bookmarks.js index b47d5f2278..975a0d54f8 100644 --- a/src/topics/bookmarks.js +++ b/src/topics/bookmarks.js @@ -8,6 +8,9 @@ var posts = require('../posts'); module.exports = function (Topics) { Topics.getUserBookmark = function (tid, uid, callback) { + if (!parseInt(uid, 10)) { + return callback(null, null); + } db.sortedSetScore('tid:' + tid + ':bookmarks', uid, callback); };