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:
Ali BARIN
2024-07-11 13:23:59 +02:00
committed by GitHub
2 changed files with 6 additions and 3 deletions

View File

@@ -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')

View File

@@ -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({