mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 11:54:41 +08:00
DEV: Remove unnecessary optional chaining operators (#30400)
This commit is contained in:
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user