Do not crash the whole UI when loading an invalid column

remotes/1727458204337373841/tmp_refs/heads/signup-info-prompt
Thibaut Girka 2018-11-28 14:56:22 +01:00 committed by ThibG
parent c18bb5d245
commit 39c8a71df8
1 changed files with 5 additions and 0 deletions

View File

@ -52,6 +52,11 @@ class Bundle extends React.Component {
load = (props) => {
const { fetchComponent, onFetch, onFetchSuccess, onFetchFail, renderDelay } = props || this.props;
if (fetchComponent === undefined) {
this.setState({ mod: null });
return Promise.resolve();
}
onFetch();
if (Bundle.cache[fetchComponent.name]) {