Skip to content

Commit 07aacd2

Browse files
authored
Initialize all services as soon as the first service is needed (microsoft#191890)
Fixes microsoft/monaco-editor#4120: initialize all services as soon as the first service is needed
1 parent 1ebb673 commit 07aacd2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/vs/editor/standalone/browser/standaloneServices.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,9 @@ export module StandaloneServices {
11141114
serviceCollection.set(IInstantiationService, instantiationService);
11151115

11161116
export function get<T>(serviceId: ServiceIdentifier<T>): T {
1117+
if (!initialized) {
1118+
initialize({});
1119+
}
11171120
const r = serviceCollection.get(serviceId);
11181121
if (!r) {
11191122
throw new Error('Missing service ' + serviceId);

0 commit comments

Comments
 (0)