Skip to content

Commit

Permalink
restricting call to updateHostValue on type change, only runs if host…
Browse files Browse the repository at this point in the history
… has not been modified
  • Loading branch information
jordanhailey authored and corneliusludmann committed Jun 11, 2021
1 parent 96808e0 commit cbec1a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/dashboard/src/settings/Integrations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,8 @@ export function GitIntegrationModal(props: ({

useEffect(() => {
if (props.mode === "new") {
// If the host value has been modified e.g. not gitlab.example.com, assume it has been set by user and end operation
if (!host.includes(".example.com")) return;
const exampleHostname = `${type.toLowerCase()}.example.com`;
updateHostValue(exampleHostname);
}
Expand Down

0 comments on commit cbec1a3

Please sign in to comment.