FIX: Do not attempt to focus topic-list-item after destroy (#22468)
Under certain conditions, this `afterRender` hook can be triggered after the topic-list-item has been removed from the DOM. This is more likely when the 'loading slider' strategy is used on a site.
This commit is contained in:
parent
250e3d881d
commit
b40347dcac
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue