From 4f8aa1807edeab8ea49544e1a3e28f2b89b8b8d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 4 Aug 2023 12:49:44 -0400 Subject: [PATCH] allow first page too --- src/socket.io/categories.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/socket.io/categories.js b/src/socket.io/categories.js index 0a90698115..169e207b0d 100644 --- a/src/socket.io/categories.js +++ b/src/socket.io/categories.js @@ -148,7 +148,7 @@ SocketCategories.isModerator = async function (socket, cid) { }; SocketCategories.loadMoreSubCategories = async function (socket, data) { - if (!data || !data.cid || !(parseInt(data.start, 10) > 0)) { + if (!data || !data.cid || !(parseInt(data.start, 10) >= 0)) { throw new Error('[[error:invalid-data]]'); } const allowed = await privileges.categories.can('read', data.cid, socket.uid);