Skip to content

Node.js based forum software built for the modern web

added error key

barisusaklid366be796795
diff --git a/src/socket.io/categories.js b/src/socket.io/categories.js
index 0dd546ef16..eaa6eb0966 100644
--- a/src/socket.io/categories.js
+++ b/src/socket.io/categories.js
@@ -13,7 +13,7 @@ SocketCategories.getRecentReplies = function(socket, cid, callback) {
return callback(err);
}
- if (privileges && !privileges.read) {
+ if (!privileges || !privileges.read) {
return callback(null, []);
}
@@ -27,7 +27,7 @@ SocketCategories.get = function(socket, data, callback) {
SocketCategories.loadMore = function(socket, data, callback) {
if(!data) {
- return callback(new Error('invalid data'));
+ return callback(new Error('[[error:invalid-data]]'));
}
user.getSettings(socket.uid, function(err, settings) {