mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-25 01:24:02 -05:00
Do not crash the whole UI when loading an invalid column
This commit is contained in:
parent
c18bb5d245
commit
39c8a71df8
@ -52,6 +52,11 @@ class Bundle extends React.Component {
|
|||||||
load = (props) => {
|
load = (props) => {
|
||||||
const { fetchComponent, onFetch, onFetchSuccess, onFetchFail, renderDelay } = props || this.props;
|
const { fetchComponent, onFetch, onFetchSuccess, onFetchFail, renderDelay } = props || this.props;
|
||||||
|
|
||||||
|
if (fetchComponent === undefined) {
|
||||||
|
this.setState({ mod: null });
|
||||||
|
return Promise.resolve();
|
||||||
|
}
|
||||||
|
|
||||||
onFetch();
|
onFetch();
|
||||||
|
|
||||||
if (Bundle.cache[fetchComponent.name]) {
|
if (Bundle.cache[fetchComponent.name]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user