diff --git a/app/assets/javascripts/discourse-common/addon/utils/decorators.js b/app/assets/javascripts/discourse-common/addon/utils/decorators.js index 3439a4239fb..c5428229773 100644 --- a/app/assets/javascripts/discourse-common/addon/utils/decorators.js +++ b/app/assets/javascripts/discourse-common/addon/utils/decorators.js @@ -20,7 +20,7 @@ export function afterRender(target, name, descriptor) { const originalFunction = descriptor.value; descriptor.value = function () { schedule("afterRender", () => { - if (this.element && !this.isDestroying && !this.isDestroyed) { + if (!this.isDestroying && !this.isDestroyed) { return originalFunction.apply(this, arguments); } });