feature(react-base16-styling): allow theme to be undefined

This commit is contained in:
Nathan Bierema 2020-08-21 19:49:49 -04:00
parent e2da4e084f
commit 53961df8a4

View File

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