Merge pull request #1959 from automatisch/AUT-1088
fix: introduce fix for undefined id on dialog close when adding a connection
This commit is contained in:
@@ -108,7 +108,11 @@ function AddAppConnection(props) {
|
||||
if (appAuthClientId) return <React.Fragment />;
|
||||
|
||||
return (
|
||||
<Dialog open={true} onClose={onClose} data-test="add-app-connection-dialog">
|
||||
<Dialog
|
||||
open={true}
|
||||
onClose={() => onClose()}
|
||||
data-test="add-app-connection-dialog"
|
||||
>
|
||||
<DialogTitle>
|
||||
{hasConnection
|
||||
? formatMessage('app.reconnectConnection')
|
||||
|
@@ -140,8 +140,7 @@ function ChooseConnectionSubstep(props) {
|
||||
const handleAddConnectionClose = React.useCallback(
|
||||
async (response) => {
|
||||
setShowAddConnectionDialog(false);
|
||||
const connectionId = response?.createConnection.id;
|
||||
|
||||
const connectionId = response?.createConnection?.id;
|
||||
if (connectionId) {
|
||||
await refetch();
|
||||
onChange({
|
||||
|
Reference in New Issue
Block a user