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 />;
|
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')
|
||||||
|
@@ -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({
|
||||||
|
Reference in New Issue
Block a user