File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -156,9 +156,7 @@ export class Setup
156156
157157 this . webviewMessages = this . createWebviewMessageHandler ( )
158158
159- if ( this . webview ) {
160- void this . sendDataToWebview ( )
161- }
159+ void this . sendDataToWebview ( )
162160
163161 this . getHasData = ( ) => experiments . getHasData ( )
164162 this . getExpShowError = ( ) => experiments . getCliError ( )
@@ -213,9 +211,7 @@ export class Setup
213211
214212 public async showSetup ( focusSection ?: SetupSection ) {
215213 this . focusedSection = focusSection
216- if ( this . webview ) {
217- void this . sendDataToWebview ( )
218- }
214+ void this . sendDataToWebview ( )
219215
220216 return await this . showWebview ( )
221217 }
@@ -258,7 +254,7 @@ export class Setup
258254 }
259255
260256 public isFocused ( ) {
261- return ! ! this . webview ?. isActive
257+ return ! ! this . getWebview ( ) ?. isActive
262258 }
263259
264260 public shouldBeShown ( ) : { dvc : boolean ; experiments : boolean } {
@@ -401,6 +397,10 @@ export class Setup
401397 }
402398
403399 private async sendDataToWebview ( ) {
400+ if ( ! this . getWebview ( ) ) {
401+ return
402+ }
403+
404404 const projectInitialized = this . hasRoots ( )
405405 const hasData = this . getHasData ( )
406406
You can’t perform that action at this time.
0 commit comments