DEV: Remove unnecessary optional chaining operators (#30400)

This commit is contained in:
Jarek Radosz
2024-12-20 16:48:13 +01:00
committed by GitHub
parent 05dca4c31e
commit d18bf67868
4 changed files with 5 additions and 6 deletions

View File

@ -7,7 +7,8 @@ export default class ChatDraftsManager extends Service {
drafts = {};
willDestroy() {
cancel(this?._persistHandler);
super.willDestroy(...arguments);
cancel(this._persistHandler);
}
async add(message, channelId, threadId) {

View File

@ -18,8 +18,6 @@ export default class ChatGuardian extends Service {
}
canUseChat() {
return (
this.currentUser?.has_chat_enabled && this.siteSettings?.chat_enabled
);
return this.currentUser?.has_chat_enabled && this.siteSettings.chat_enabled;
}
}