From b955fd363d25995fa216880836175a8eda849527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 5 Oct 2020 14:41:24 -0400 Subject: [PATCH] fix: dont allow sorting pinned topics on recent --- public/src/client/category/tools.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/client/category/tools.js b/public/src/client/category/tools.js index 7159466f6af3..74e7111f7f5a 100644 --- a/public/src/client/category/tools.js +++ b/public/src/client/category/tools.js @@ -263,7 +263,7 @@ define('forum/category/tools', [ } function handlePinnedTopicSort() { - if (!ajaxify.data.topics) { + if (!ajaxify.data.topics || !ajaxify.data.template.category) { return; } var numPinned = ajaxify.data.topics.reduce(function (memo, topic) {