File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export async function loadCurrentThemeData(): Promise<ThemeData> {
20
20
21
21
export interface ThemeData {
22
22
type : string ,
23
- colors : { [ key : string ] : string }
23
+ colors ? : { [ key : string ] : string }
24
24
tokenColors : any [ ] ,
25
25
semanticTokenColors : any [ ]
26
26
}
@@ -72,17 +72,17 @@ function getCurrentThemePaths(themeName: string): vscode.Uri | undefined {
72
72
}
73
73
74
74
export function getIconForeground ( themeData : ThemeData , kind : 'light' | 'dark' ) : string {
75
- return themeData . colors [ 'icon.foreground' ] ?? ( kind === 'dark' ? '#C5C5C5' : '#424242' ) ;
75
+ return ( themeData . colors ? themeData . colors [ 'icon.foreground' ] : undefined ) ?? ( kind === 'dark' ? '#C5C5C5' : '#424242' ) ;
76
76
}
77
77
78
78
export function getListWarningForeground ( themeData : ThemeData , kind : 'light' | 'dark' ) : string {
79
- return themeData . colors [ 'list.warningForeground' ] ?? ( kind === 'dark' ? '#CCA700' : '#855F00' ) ;
79
+ return ( themeData . colors ? themeData . colors [ 'list.warningForeground' ] : undefined ) ?? ( kind === 'dark' ? '#CCA700' : '#855F00' ) ;
80
80
}
81
81
82
82
export function getListErrorForeground ( themeData : ThemeData , kind : 'light' | 'dark' ) : string {
83
- return themeData . colors [ 'list.errorForeground' ] ?? ( kind === 'dark' ? '#F88070' : '#B01011' ) ;
83
+ return ( themeData . colors ? themeData . colors [ 'list.errorForeground' ] : undefined ) ?? ( kind === 'dark' ? '#F88070' : '#B01011' ) ;
84
84
}
85
85
86
86
export function getNotebookStatusSuccessIconForeground ( themeData : ThemeData , kind : 'light' | 'dark' ) : string {
87
- return themeData . colors [ 'notebookStatusSuccessIcon.foreground' ] ?? ( kind === 'dark' ? '#89D185' : '#388A34' ) ;
87
+ return ( themeData . colors ? themeData . colors [ 'notebookStatusSuccessIcon.foreground' ] : undefined ) ?? ( kind === 'dark' ? '#89D185' : '#388A34' ) ;
88
88
}
You can’t perform that action at this time.
0 commit comments