mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
Set counter name to category id instead of category slug
If using slug, when we edit the category, the slug changes and the counter become 0 until we refresh the browser. I think it's better if we stick with _id because _id is not changing.
This commit is contained in:
parent
452e521ee9
commit
869d203917
1 changed files with 1 additions and 1 deletions
|
@ -63,6 +63,6 @@ Categories.helpers({getUrl: function () {return Categories.getUrl(this);}});
|
|||
* @param {Object} category
|
||||
*/
|
||||
Categories.getCounterName = function (category) {
|
||||
return category.slug + "-postsCount";
|
||||
return category._id + "-postsCount";
|
||||
}
|
||||
Categories.helpers({getCounterName: function () {return Categories.getCounterName(this);}});
|
||||
|
|
Loading…
Add table
Reference in a new issue