mirror of
https://github.com/discourse/discourse.git
synced 2024-12-04 03:33:44 +08:00
DEV: Don't check this.element
in @afterRender
(#16033)
This would allow to use the decorator in tag-less components and in controllers.
This commit is contained in:
parent
72c69a644f
commit
6bbc822495
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user