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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 6 deletions

View File

@ -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;

View File

@ -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() {

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;
}
}