File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -49,16 +49,18 @@ const mainWebViewProvider: IWebViewProvider = {
4949export async function activate ( context : ExecutionActivationContext ) : Promise < void > {
5050 logger . debug ( 'Interlinearizer extension is activating!' ) ;
5151
52- const mainWebViewProviderPromise = papi . webViewProviders . registerWebViewProvider (
52+ const mainWebViewProviderRegistration = await papi . webViewProviders . registerWebViewProvider (
5353 mainWebViewType ,
5454 mainWebViewProvider ,
5555 ) ;
5656
57- papi . webViews . openWebView ( mainWebViewType , undefined , { existingId : '?' } ) . catch ( ( err ) => {
58- logger . error ( `Failed to open ${ mainWebViewType } WebView: ${ err } ` ) ;
59- } ) ;
57+ context . registrations . add ( mainWebViewProviderRegistration ) ;
6058
61- context . registrations . add ( await mainWebViewProviderPromise ) ;
59+ try {
60+ await papi . webViews . openWebView ( mainWebViewType , undefined , { existingId : '?' } ) ;
61+ } catch ( err ) {
62+ logger . error ( `Failed to open ${ mainWebViewType } WebView: ${ err } ` ) ;
63+ }
6264
6365 logger . debug ( 'Interlinearizer extension finished activating!' ) ;
6466}
You can’t perform that action at this time.
0 commit comments