diff --git a/app/assets/javascripts/discourse/app/components/topic-list-item.js b/app/assets/javascripts/discourse/app/components/topic-list-item.js index 806da566fd8..4bdbd7de4bd 100644 --- a/app/assets/javascripts/discourse/app/components/topic-list-item.js +++ b/app/assets/javascripts/discourse/app/components/topic-list-item.js @@ -285,7 +285,7 @@ export default Component.extend({ this.element.classList.remove("highlighted"); }); if (opts.isLastViewedTopic && this._shouldFocusLastVisited()) { - this._titleElement().focus(); + this._titleElement()?.focus(); } }); },