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 {
5353 launchType : LaunchType ,
5454 fileUri ?: vscode . Uri ) : Promise < boolean > {
5555
56- if ( fileUri === undefined ) {
57- fileUri = vscode . window . activeTextEditor ?. document . uri ;
58- }
56+ fileUri ??= vscode . window . activeTextEditor ?. document . uri ;
5957
6058 if ( fileUri === undefined ) {
6159 return false ;
Original file line number Diff line number Diff line change @@ -140,9 +140,9 @@ export class Logger implements ILogger {
140140export class LanguageClientOutputChannelAdapter implements LogOutputChannel {
141141 private _channel : LogOutputChannel | undefined ;
142142 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+ } ) ;
146146 return this . _channel ;
147147 }
148148
Original file line number Diff line number Diff line change @@ -631,9 +631,7 @@ class PossiblePowerShellExe implements IPossiblePowerShellExe {
631631 public readonly suppressWarning = false ) { }
632632
633633 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 ) ;
637635 return this . knownToExist ?? false ;
638636 }
639637}
You can’t perform that action at this time.
0 commit comments