Skip to content

A platform for community discussion. Free, open, simple.

FIX: Do not attempt to focus topic-list-item after destroy (#22468)

David Taylorb40347dcacd4
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 33722e1979a..f18e912aa53 100644
--- a/app/assets/javascripts/discourse/app/components/topic-list-item.js
+++ b/app/assets/javascripts/discourse/app/components/topic-list-item.js
@@ -63,6 +63,9 @@ export default Component.extend({
htmlSafe(template(this, RUNTIME_OPTIONS))
);
schedule("afterRender", () => {
+ if (this.isDestroyed || this.isDestroying) {
+ return;
+ }
if (this.selected && this.selected.includes(this.topic)) {
this.element.querySelector("input.bulk-select").checked = true;
}