fix: use template name instead of component

topic page can have suggested topics which has category component
This commit is contained in:
Barış Soner Uşaklı
2023-10-13 18:47:47 -04:00
parent b870538095
commit f6120ebb9f

View File

@@ -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;