Skip to content

Commit

Permalink
fix(ui): set project to empty string if undefined (#18732)
Browse files Browse the repository at this point in the history
There are some situations where the project will be `undefined`. When
that happens, attempting to delete a repo won't be possible, since
the backend will be looking for a project with the literal name
`undefined`. To fix this, set an empty string for `undefined|null`
values.

Signed-off-by: Blake Pettersson <[email protected]>
  • Loading branch information
blakepettersson authored Jun 19, 2024
1 parent fe60670 commit fbd5c81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/src/app/settings/components/repos-list/repos-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ export class ReposList extends React.Component<
const confirmed = await this.appContext.apis.popup.confirm('Disconnect repository', `Are you sure you want to disconnect '${repo}'?`);
if (confirmed) {
try {
await services.repos.delete(repo, project);
await services.repos.delete(repo, project || '');
this.repoLoader.reload();
} catch (e) {
this.appContext.apis.notifications.show({
Expand Down

0 comments on commit fbd5c81

Please sign in to comment.