add check if links exists in order to update permissions directly before fetching

This commit is contained in:
Maren Süwer
2018-09-07 10:04:42 +02:00
parent 50d0769db0
commit 46132585e8
3 changed files with 7 additions and 6 deletions

View File

@@ -90,7 +90,7 @@ class SinglePermission extends React.Component<Props, State> {
render() {
const { permission } = this.state;
const { loading, error, namespace, repoName } = this.props;
const typeSelector = this.props.permission._links.update ? (
const typeSelector = this.props.permission._links && this.props.permission._links.update ? (
<td>
<TypeSelector
handleTypeChange={this.handleTypeChange}