reenabled @typescript-eslint/prefer-nullish-coalescing

This commit is contained in:
Eugene Pankov
2021-01-02 19:09:34 +01:00
parent eb12b1ae60
commit 946f4292ef
28 changed files with 61 additions and 68 deletions

View File

@@ -44,7 +44,7 @@ export class SerialSession extends BaseSession {
constructor (public connection: SerialConnection) {
super()
this.scripts = connection.scripts || []
this.scripts = connection.scripts ?? []
}
async start (): Promise<void> {

View File

@@ -37,7 +37,7 @@ export class EditConnectionModalComponent {
}
async ngOnInit () {
this.connection.scripts = this.connection.scripts || []
this.connection.scripts = this.connection.scripts ?? []
this.foundPorts = await this.serial.listPorts()
}

View File

@@ -57,7 +57,6 @@ export class SerialService {
this.toastr.error(e.message)
reject(e)
}
})
return serial
}
@@ -125,7 +124,7 @@ export class SerialService {
{ connection }
) as SerialTabComponent
if (connection.color) {
(this.app.getParentTab(tab) || tab).color = connection.color
(this.app.getParentTab(tab) ?? tab).color = connection.color
}
setTimeout(() => {
this.app.activeTab.emitFocused()