From 2dce5bedce65a02ddd715f35e75b3b9d22b16faa Mon Sep 17 00:00:00 2001 From: ccd0 Date: Mon, 16 Jan 2017 09:29:23 -0800 Subject: [PATCH] This can execute between thread+post parsing and Thread Watcher callback being run. --- src/Monitoring/ThreadWatcher.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Monitoring/ThreadWatcher.coffee b/src/Monitoring/ThreadWatcher.coffee index c43a760dc..f417090a7 100644 --- a/src/Monitoring/ThreadWatcher.coffee +++ b/src/Monitoring/ThreadWatcher.coffee @@ -340,8 +340,8 @@ ThreadWatcher = isWatched = ThreadWatcher.isWatched thread if thread.OP for post in [thread.OP, thread.OP.clones...] - toggler = $ '.watch-thread-link', post.nodes.info - ThreadWatcher.setToggler toggler, isWatched + if (toggler = $ '.watch-thread-link', post.nodes.info) + ThreadWatcher.setToggler toggler, isWatched (thread.catalogView.nodes.root.classList.toggle 'watched', isWatched if thread.catalogView) if Conf['Pin Watched Threads']