FIX: cancels fetching messages when pane is destroyed (#19642)

Ultimately we would want a cleaner solution here where we correctly cancel in `willDestroy` hook but this is the safest move for now.
This commit is contained in:
Joffrey JAFFEUX 2022-12-28 16:01:41 +01:00 committed by GitHub
parent ec1a7df112
commit 8a792bdf0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -229,6 +229,10 @@ export default Component.extend({
@debounce(100)
fetchMessages(channel, options = {}) {
if (this._selfDeleted) {
return;
}
this.set("loading", true);
return this.chat.loadCookFunction(this.site.categories).then((cook) => {