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> {
2020
2121export interface ThemeData {
2222 type : string ,
23- colors : { [ key : string ] : string }
23+ colors ? : { [ key : string ] : string }
2424 tokenColors : any [ ] ,
2525 semanticTokenColors : any [ ]
2626}
@@ -72,17 +72,17 @@ function getCurrentThemePaths(themeName: string): vscode.Uri | undefined {
7272}
7373
7474export 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' ) ;
7676}
7777
7878export 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' ) ;
8080}
8181
8282export 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' ) ;
8484}
8585
8686export 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' ) ;
8888}
You can’t perform that action at this time.
0 commit comments