diff --git a/extensions/vscode/src/activation/InlineTipManager.ts b/extensions/vscode/src/activation/InlineTipManager.ts index 5e88c5ad16d..9ae35c6e8cd 100644 --- a/extensions/vscode/src/activation/InlineTipManager.ts +++ b/extensions/vscode/src/activation/InlineTipManager.ts @@ -236,7 +236,7 @@ export class InlineTipManager { private createSvgTooltipDecoration() { var backgroundColour = "#333333"; - if (this.theme) { + if (this.theme?.colors?.["editor.background"]) { backgroundColour = this.theme.colors["editor.background"]; } return vscode.window.createTextEditorDecorationType({ @@ -274,7 +274,8 @@ export class InlineTipManager { { ...baseTextConfig, x: SVG_CONFIG.chatLabelX, - fill: this.theme?.colors["editor.foreground"] ?? SVG_CONFIG.stroke, + fill: + this.theme?.colors?.["editor.foreground"] ?? SVG_CONFIG.stroke, }, SVG_CONFIG.chatLabel, ) @@ -291,7 +292,8 @@ export class InlineTipManager { { ...baseTextConfig, x: SVG_CONFIG.editLabelX, - fill: this.theme?.colors["editor.foreground"] ?? SVG_CONFIG.stroke, + fill: + this.theme?.colors?.["editor.foreground"] ?? SVG_CONFIG.stroke, }, SVG_CONFIG.editLabel, ) diff --git a/extensions/vscode/src/activation/JumpManager.ts b/extensions/vscode/src/activation/JumpManager.ts index 43c4ed8fdff..0dd7f4066c6 100644 --- a/extensions/vscode/src/activation/JumpManager.ts +++ b/extensions/vscode/src/activation/JumpManager.ts @@ -145,7 +145,8 @@ export class JumpManager { { ...baseTextConfig, x: 4, - fill: this._theme?.colors["editor.foreground"] ?? SVG_CONFIG.stroke, + fill: + this._theme?.colors?.["editor.foreground"] ?? SVG_CONFIG.stroke, }, SVG_CONFIG.label, ) @@ -168,7 +169,7 @@ export class JumpManager { private _createSvgJumpDecoration(): vscode.TextEditorDecorationType { const backgroundColour = - this._theme?.colors["editor.background"] ?? "#333333"; + this._theme?.colors?.["editor.background"] ?? "#333333"; return vscode.window.createTextEditorDecorationType({ after: {