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 />; if (appAuthClientId) return <React.Fragment />;
return ( return (
<Dialog open={true} onClose={onClose} data-test="add-app-connection-dialog"> <Dialog
open={true}
onClose={() => onClose()}
data-test="add-app-connection-dialog"
>
<DialogTitle> <DialogTitle>
{hasConnection {hasConnection
? formatMessage('app.reconnectConnection') ? formatMessage('app.reconnectConnection')

View File

@@ -140,8 +140,7 @@ function ChooseConnectionSubstep(props) {
const handleAddConnectionClose = React.useCallback( const handleAddConnectionClose = React.useCallback(
async (response) => { async (response) => {
setShowAddConnectionDialog(false); setShowAddConnectionDialog(false);
const connectionId = response?.createConnection.id; const connectionId = response?.createConnection?.id;
if (connectionId) { if (connectionId) {
await refetch(); await refetch();
onChange({ onChange({