From 42245f2f354082f131f9244b2e32c6953d16eb93 Mon Sep 17 00:00:00 2001 From: Kuba Suder Date: Mon, 13 May 2024 04:34:32 +0200 Subject: [PATCH] don't check quote count when subthread is loaded --- skythread.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/skythread.js b/skythread.js index 8029416..f1c4e61 100644 --- a/skythread.js +++ b/skythread.js @@ -399,10 +399,11 @@ function loadThread(url, postId, nodeToUpdate) { let root = Post.parseThreadPost(json.thread); window.root = root; - let loadQuoteCount = blue.getQuoteCount(root.uri); + let loadQuoteCount; if (!nodeToUpdate) { setPageTitle(root); + loadQuoteCount = blue.getQuoteCount(root.uri); } if (root.parent && !nodeToUpdate) { @@ -420,7 +421,7 @@ function loadThread(url, postId, nodeToUpdate) { $id('thread').appendChild(list); } - loadQuoteCount.then(count => { + loadQuoteCount?.then(count => { if (count > 0) { let stats = list.querySelector(':scope > .content > p.stats'); let q = new URL(getLocation()); -- 2.51.2