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.
This commit is contained in:
Bianca Nenciu
2021-06-30 15:30:16 +10:00
committed by GitHub
parent b8a0e47913
commit e123476329
@@ -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(