mirror of
https://github.com/discourse/discourse.git
synced 2025-01-01 15:23:45 +08:00
DEV: Remove unnecessary optional chaining operators (#30400)
This commit is contained in:
parent
05dca4c31e
commit
d18bf67868
|
@ -28,7 +28,7 @@ export default class History extends Component {
|
|||
|
||||
@tracked loading;
|
||||
@tracked postRevision;
|
||||
@tracked viewMode = this.site?.mobileView ? "inline" : "side_by_side";
|
||||
@tracked viewMode = this.site.mobileView ? "inline" : "side_by_side";
|
||||
@tracked bodyDiff;
|
||||
@tracked initialLoad = true;
|
||||
|
||||
|
|
|
@ -465,7 +465,7 @@ export default class UppyUpload {
|
|||
|
||||
#xhrUploadUrl() {
|
||||
const uploadUrl = this.config.uploadUrl || this.config.uploadRootPath;
|
||||
return getUrl(uploadUrl) + ".json?client_id=" + this.messageBus?.clientId;
|
||||
return getUrl(uploadUrl) + ".json?client_id=" + this.messageBus.clientId;
|
||||
}
|
||||
|
||||
#bindFileInputChange() {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user