Addresses PR issues

This commit is contained in:
Alex Corey
2019-07-03 12:43:40 -04:00
parent d4f50896de
commit 320581a6c0

View File

@@ -41,8 +41,10 @@ class Organization extends Component {
}
async componentDidUpdate(prevProps) {
const { location } = this.props;
if (location !== prevProps.location) {
const { location, match } = this.props;
const url = `/organizations/${match.params.id}/`;
const shouldUpdate = prevProps.location.pathname.includes(url);
if (location !== prevProps.location && shouldUpdate) {
await this.loadOrganization();
}
}