mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-03 06:10:38 +01:00
dont count drafts
This commit is contained in:
@@ -61,7 +61,7 @@ function buildTemplatesFromAreas(areas) {
|
||||
templates.push({
|
||||
template: area.template,
|
||||
areas: [],
|
||||
widgetCount: area.data.length,
|
||||
widgetCount: area.location !== 'drafts' ? area.data.length : 0,
|
||||
});
|
||||
|
||||
index += 1;
|
||||
@@ -71,7 +71,9 @@ function buildTemplatesFromAreas(areas) {
|
||||
name: area.name,
|
||||
location: area.location,
|
||||
});
|
||||
templates[list[area.template]].widgetCount += area.data.length;
|
||||
if (area.location !== 'drafts') {
|
||||
templates[list[area.template]].widgetCount += area.data.length;
|
||||
}
|
||||
});
|
||||
return templates;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user