File tree 2 files changed +7
-2
lines changed
packages/monaco-graphql/src
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' monaco-graphql ' : minor
3
+ ---
4
+
5
+ Fix race condition in the worker Manager
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export class WorkerManager {
18
18
private _lastUsedTime = 0 ;
19
19
private _configChangeListener : IDisposable ;
20
20
private _worker : editor . MonacoWebWorker < GraphQLWorker > | null = null ;
21
- private _client : GraphQLWorker | null = null ;
21
+ private _client : Promise < GraphQLWorker > | null = null ;
22
22
23
23
constructor ( defaults : MonacoGraphQLAPI ) {
24
24
this . _defaults = defaults ;
@@ -83,7 +83,7 @@ export class WorkerManager {
83
83
} ,
84
84
} as ICreateData ,
85
85
} ) ;
86
- this . _client = await this . _worker . getProxy ( ) ;
86
+ this . _client = this . _worker . getProxy ( ) ;
87
87
} catch ( error ) {
88
88
// eslint-disable-next-line no-console
89
89
console . error ( 'error loading worker' , error ) ;
You can’t perform that action at this time.
0 commit comments