feature(react-base16-styling): allow theme in invertTheme to be undefined (#600)

This commit is contained in:
Nathan Bierema 2020-08-21 19:56:29 -04:00 committed by GitHub
parent e2da4e084f
commit ac6f7435c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -266,7 +266,7 @@ export const getBase16Theme = (
: undefined; : undefined;
}; };
export const invertTheme = (theme: Theme): Theme => { export const invertTheme = (theme: Theme | undefined): Theme | undefined => {
if (typeof theme === 'string') { if (typeof theme === 'string') {
return `${theme}:inverted`; return `${theme}:inverted`;
} }