#365: fix warning on bsod screen

This commit is contained in:
SleepWalker 2017-12-25 22:03:52 +02:00
parent 3f869f92e2
commit 50d753e006
2 changed files with 4 additions and 4 deletions

View File

@ -6,14 +6,14 @@ import { IntlProvider as OrigIntlProvider } from 'react-intl';
class IntlProvider extends Component {
static displayName = 'IntlProvider';
static propTypes = {
locale: PropTypes.string.isRequired,
messages: PropTypes.objectOf(PropTypes.string).isRequired,
locale: PropTypes.string,
messages: PropTypes.objectOf(PropTypes.string),
children: PropTypes.element
};
render() {
return (
<OrigIntlProvider {...this.props} />
<OrigIntlProvider locale="en" {...this.props} />
);
}
}

View File

@ -17,7 +17,7 @@ export default function BSoD({store}: {store: *}) {
<IntlProvider store={store}>
<div className={styles.body}>
<canvas className={styles.canvas}
ref={(el: ?HTMLCanvasElement) => new BoxesField(el)}
ref={(el: ?HTMLCanvasElement) => el && new BoxesField(el)}
/>
<div className={styles.wrapper}>