FIX: Don't force show topic map on non-first posts (#19302)

By default, the topic map in the OP shows only if there are replies.
Some themes may want to show it at all times, and to do so, they can
use the API via `api.includePostAttributes('topicMap');`.

But this was including the topic map in every post. This change ensures
that attribute is only set for the first post (and it only affects that
API endpoint).
This commit is contained in:
Penar Musaraj 2022-12-05 09:42:32 -05:00 committed by GitHub
parent d2c5c65e29
commit 1245743595
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,7 +178,7 @@ export default function transformPost(
}
const showTopicMap =
_additionalAttributes.includes("topicMap") ||
(_additionalAttributes.includes("topicMap") && post.post_number === 1) ||
showPMMap ||
(post.post_number === 1 &&
topic.archetype === "regular" &&