Prettified index.tsx

This commit is contained in:
Bruno Fenzl 2020-09-25 11:19:11 +02:00
parent d05bd5311b
commit 7c15ca9c1c

View File

@ -135,7 +135,10 @@ export default class JSONTree extends React.Component<Props, State> {
this.state = getStateFromProps(props);
}
static getDerivedStateFromProps(nextProps: Props, state: State): State | null {
static getDerivedStateFromProps(
nextProps: Props,
state: State
): State | null {
if (
['theme', 'invertTheme'].find(
(k) => nextProps[k as keyof ThemesConf] !== state[k as keyof ThemesConf]