FIX: Always render topic counts (#13563)

FIX: Always render topic counts (#13563)

A post is rendered multiple times when it is being loaded. Sometimes, not all information is available and the best link in the Onebox cannot be found.

diff --git a/app/assets/javascripts/discourse/app/widgets/post-cooked.js b/app/assets/javascripts/discourse/app/widgets/post-cooked.js
index eb870d3..35c65f9 100644
--- a/app/assets/javascripts/discourse/app/widgets/post-cooked.js
+++ b/app/assets/javascripts/discourse/app/widgets/post-cooked.js
@@ -142,7 +142,8 @@ export default class PostCooked {
           const $onebox = $link.closest(".onebox");
           if (
             $onebox.length === 0 ||
-            (bestElements[$onebox[0]] && bestElements[$onebox[0]] === $link[0])
+            !bestElements[$onebox[0]] ||
+            bestElements[$onebox[0]] === $link[0]
           ) {
             const title = I18n.t("topic_map.clicks", { count: lc.clicks });
             $link.append(

GitHub sha: e123476329fe3f7515e38dd0260630370e606d9a

This commit appears in #13563 which was approved by udan11 and eviltrout. It was merged by SamSaffron.