mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
only send noscript paginator data on cold loads
This commit is contained in:
@@ -217,13 +217,15 @@ topicsController.get = function(req, res, next) {
|
||||
topic_url += '?' + queryString;
|
||||
}
|
||||
|
||||
// Paginator for noscript
|
||||
data.pages = [];
|
||||
for(var x=1; x<=data.pageCount; x++) {
|
||||
data.pages.push({
|
||||
page: x,
|
||||
active: x === parseInt(page, 10)
|
||||
});
|
||||
if (!res.locals.isAPI) {
|
||||
// Paginator for noscript
|
||||
data.pages = [];
|
||||
for(var x=1; x<=data.pageCount; x++) {
|
||||
data.pages.push({
|
||||
page: x,
|
||||
active: x === parseInt(page, 10)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
res.render('topic', data);
|
||||
|
||||
Reference in New Issue
Block a user