File tree Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -53,9 +53,7 @@ export class PesterTestsFeature implements vscode.Disposable {
53
53
launchType : LaunchType ,
54
54
fileUri ?: vscode . Uri ) : Promise < boolean > {
55
55
56
- if ( fileUri === undefined ) {
57
- fileUri = vscode . window . activeTextEditor ?. document . uri ;
58
- }
56
+ fileUri ??= vscode . window . activeTextEditor ?. document . uri ;
59
57
60
58
if ( fileUri === undefined ) {
61
59
return false ;
Original file line number Diff line number Diff line change @@ -140,9 +140,9 @@ export class Logger implements ILogger {
140
140
export class LanguageClientOutputChannelAdapter implements LogOutputChannel {
141
141
private _channel : LogOutputChannel | undefined ;
142
142
private get channel ( ) : LogOutputChannel {
143
- if ( ! this . _channel ) {
144
- this . _channel = window . createOutputChannel ( this . channelName , { log : true } ) ;
145
- }
143
+ this . _channel ??= window . createOutputChannel ( this . channelName , {
144
+ log : true ,
145
+ } ) ;
146
146
return this . _channel ;
147
147
}
148
148
Original file line number Diff line number Diff line change @@ -631,9 +631,7 @@ class PossiblePowerShellExe implements IPossiblePowerShellExe {
631
631
public readonly suppressWarning = false ) { }
632
632
633
633
public async exists ( ) : Promise < boolean > {
634
- if ( this . knownToExist === undefined ) {
635
- this . knownToExist = await utils . checkIfFileExists ( this . exePath ) ;
636
- }
634
+ this . knownToExist ??= await utils . checkIfFileExists ( this . exePath ) ;
637
635
return this . knownToExist ?? false ;
638
636
}
639
637
}
You can’t perform that action at this time.
0 commit comments