fix: if there is no bookmarkThreshold dont init unread indicator

This commit is contained in:
Barış Soner Uşaklı
2024-01-24 12:11:17 -05:00
parent cb21f28b56
commit cf40d68176

View File

@@ -353,7 +353,8 @@ define('navigator', [
}
async function updateUnreadIndicator(index) {
if (!paginationBlockUnreadEl.length || ajaxify.data.postcount <= ajaxify.data.bookmarkThreshold) {
const { bookmarkThreshold } = ajaxify.data;
if (!paginationBlockUnreadEl.length || ajaxify.data.postcount <= bookmarkThreshold || !bookmarkThreshold) {
return;
}
const currentBookmark = ajaxify.data.bookmark || storage.getItem('topic:' + ajaxify.data.tid + ':bookmark');