Skip to content

Commit

Permalink
ERM-2637 (#317)
Browse files Browse the repository at this point in the history
* make fields value null safe
* don't disable New button after deletion
  • Loading branch information
CalamityC authored Feb 16, 2023
1 parent 3a25dd7 commit bd12f76
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export default class ProxyServerSettingsListFieldArray extends React.Component {
onDelete(proxyServer);
} else {
fields.remove(index);
this.setState({ disableNewButton: false });
}
this.setState({ disableNewButton: false });
}

handleNew = () => {
Expand Down Expand Up @@ -69,7 +69,7 @@ export default class ProxyServerSettingsListFieldArray extends React.Component {
</Col>
</Row>
{
fields.value.map((proxyServer, i) => (
fields?.value?.map((proxyServer, i) => (
<Field
key={proxyServer.id || 'new'}
component={ProxyServerSettingsFields}
Expand Down

0 comments on commit bd12f76

Please sign in to comment.