FIX: better fix for #ca84c06 (#6684)

This commit is contained in:
Joffrey JAFFEUX 2018-11-27 16:12:07 +01:00 committed by GitHub
parent f993aca363
commit 7f089f07a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -373,7 +373,8 @@ const TopicTrackingState = Discourse.Model.extend({
countCategory(category_id) {
let sum = 0;
_.each(this.states, topic => {
Object.keys(this.states).forEach(topicState => {
const topic = this.states[topicState];
if (topic.category_id === category_id && !topic.deleted) {
sum +=
topic.last_read_post_number === null ||