Skip to content

Node.js based forum software built for the modern web

fix: use template name instead of component

Barış Soner Uşaklıf6120ebb9f85
diff --git a/public/src/modules/navigator.js b/public/src/modules/navigator.js
index eabad6b410..9051524370 100644
--- a/public/src/modules/navigator.js
+++ b/public/src/modules/navigator.js
@@ -606,8 +606,8 @@ define('navigator', [
};
navigator.scrollToIndex = function (index, highlight, duration) {
- const inTopic = !!components.get('topic').length;
- const inCategory = !!components.get('category').length;
+ const inTopic = ajaxify.data.template.topic;
+ const inCategory = ajaxify.data.template.category;
if (!utils.isNumber(index) || (!inTopic && !inCategory)) {
return;