Skip to content

Commit 19de039

Browse files
author
guqiankun
committed
fix: assignment error
1 parent 1fdb899 commit 19de039

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/core/src/client/override/monacoContextKeyService.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ export class MonacoContextKeyService extends BaseContextKeyService implements IC
1212
// TODO 不放window
1313
// ContextKeyService 全局唯一 组件重置后需重新绑定
1414
this.contextKeyService =
15-
(window as any)._alex.ContextKeyService || new ContextKeyService(this.configurationService);
15+
(window as any)?._alex?.ContextKeyService || new ContextKeyService(this.configurationService);
16+
(window as any)._alex = {};
1617
(window as any)._alex.ContextKeyService = this.contextKeyService;
1718
}
1819

0 commit comments

Comments
 (0)