FIX: updated filtered replies when replies exist (#16610)

This commit is contained in:
Isaac Janzen 2022-05-03 11:16:20 -05:00 committed by GitHub
parent f219ea562f
commit 96e7c85177
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -436,8 +436,11 @@ createWidget("post-contents", {
if (this.siteSettings.enable_filtered_replies_view) {
const topicController = this.register.lookup("controller:topic");
defaultState.filteredRepliesShown =
topicController.replies_to_post_number === attrs.post_number.toString();
if (attrs.post_number) {
defaultState.filteredRepliesShown =
topicController.replies_to_post_number ===
attrs.post_number.toString();
}
}
return defaultState;