Node.js based forum software built for the modern web
fix: crash if unreadTopics is undefined
Barış Soner Uşaklı617f4730a03d
diff --git a/public/src/client/unread.js b/public/src/client/unread.jsindex 06f36272bf..6af50e0472 100644--- a/public/src/client/unread.js+++ b/public/src/client/unread.js@@ -129,7 +129,7 @@ define('forum/unread', [var unreadTopics = app.user.unreadData;function onNewPost(data) {- if (data && data.posts && data.posts.length) {+ if (data && data.posts && data.posts.length && unreadTopics) {var post = data.posts[0];if (parseInt(post.uid, 10) === parseInt(app.user.uid, 10) ||(!post.topic.isFollowing && post.categoryWatchState !== watchStates.watching)