fix mapping screen crash when office/resource is unknown

This commit is contained in:
Bilal Catic
2019-11-20 13:45:54 +01:00
parent fcb71a3f00
commit eff96f9e5e

View File

@@ -76,6 +76,7 @@ class SingleMapping extends Component {
}; };
render() { render() {
try {
const {singleMapping: {officeSlug, resourceSlug}} = this.props; const {singleMapping: {officeSlug, resourceSlug}} = this.props;
const {officeId, resourceId, officeOptions, allResourceOptions, pendingMappings} = this.props; const {officeId, resourceId, officeOptions, allResourceOptions, pendingMappings} = this.props;
const {showDeletePrompt, newOfficeId, newResourceId} = this.state; const {showDeletePrompt, newOfficeId, newResourceId} = this.state;
@@ -137,6 +138,9 @@ class SingleMapping extends Component {
</Table.Cell> </Table.Cell>
</Table.Row> </Table.Row>
); );
}catch (e) {
return null;
}
} }
} }