mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-23 14:39:58 +03:00
Fix
This commit is contained in:
parent
fc219a04f9
commit
13eeae95d7
|
@ -3,11 +3,11 @@ import getDefaultTheme from '../themes/default';
|
||||||
import { withTheme } from 'styled-components';
|
import { withTheme } from 'styled-components';
|
||||||
|
|
||||||
export default (UnthemedComponent) => (props) =>
|
export default (UnthemedComponent) => (props) =>
|
||||||
props.theme.type ? (
|
props.theme && props.theme.type ? (
|
||||||
withTheme(<UnthemedComponent {...props} />)
|
withTheme(<UnthemedComponent {...props} />)
|
||||||
) : (
|
) : (
|
||||||
// used outside of container (theme provider)
|
// used outside of container (theme provider)
|
||||||
<UnthemedComponent {...props} theme={getDefaultTheme(props.theme)} />
|
<UnthemedComponent {...props} theme={getDefaultTheme({})} />
|
||||||
);
|
);
|
||||||
|
|
||||||
// TODO: memoize it?
|
// TODO: memoize it?
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user