diff options
author | 2019-08-23 05:04:32 -0500 | |
---|---|---|
committer | 2019-08-23 17:04:32 +0700 | |
commit | de0f096386c442811371e1edece1b19d89c4f1ab (patch) | |
tree | 85a30a6bb61e6371b74c1c9ef670f8d2292b17af | |
parent | 430fb5ca201b972253fe2b2d95c44d83431e2956 (diff) | |
download | refined-github-de0f096386c442811371e1edece1b19d89c4f1ab.tar.gz refined-github-de0f096386c442811371e1edece1b19d89c4f1ab.tar.zst refined-github-de0f096386c442811371e1edece1b19d89c4f1ab.zip |
Fix console error in `mark-unread` on non-conversation views (#2354)
-rw-r--r-- | source/features/mark-unread.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/features/mark-unread.tsx b/source/features/mark-unread.tsx index 155f837c..0411ac6c 100644 --- a/source/features/mark-unread.tsx +++ b/source/features/mark-unread.tsx @@ -412,8 +412,10 @@ async function init(): Promise<void> { } else if (pageDetect.isPR() || pageDetect.isIssue()) { await markRead(location.href); - addMarkUnreadButton(); - onUpdatableContentUpdate(select('#partial-discussion-sidebar')!, addMarkUnreadButton); + if (pageDetect.isPRConversation() || pageDetect.isIssue()) { + addMarkUnreadButton(); + onUpdatableContentUpdate(select('#partial-discussion-sidebar')!, addMarkUnreadButton); + } } else if (pageDetect.isDiscussionList()) { for (const discussion of await getNotifications()) { const {pathname} = new URL(discussion.url); |