DEV: correct performance hack

This code was intended to bypass iterating through tags in absence of a new
or unread topic.

Instead it always fired cause it was checking for function existence which
was clearly always true.
This commit is contained in:
Sam Saffron 2020-07-24 08:15:40 +10:00
parent b70f1084f7
commit 179335b5e3
No known key found for this signature in database
GPG Key ID: B9606168D2FFD9F5

View File

@ -456,7 +456,7 @@ const TopicTrackingState = EmberObject.extend({
) {
let newTopic = isNew(topic);
let unreadTopic = isUnread(topic);
if (isUnread || isNew) {
if (newTopic || unreadTopic) {
tags.forEach(tag => {
if (topic.tags.indexOf(tag) > -1) {
if (unreadTopic) {