Skip to content

Commit

Permalink
fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
vinicvaz committed Nov 27, 2023
1 parent 526c5bc commit ba0cd24
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ export const RepositoriesCard: FC = () => {
source: source as repositorySource,
})
.then((data) => {
setAvailableVersions(data.splice(0, 10));
if (data) {
setAvailableVersions(data?.splice(0, 10));
}
setStep("SELECT_VERSION");
})
.catch((e) => {
Expand Down Expand Up @@ -194,7 +196,16 @@ export const RepositoriesCard: FC = () => {
<CardContent>
<Box>
<Typography variant="subtitle1" sx={{ mb: 1 }}>
Add Pieces repository by URL. To discover available Pieces repositories, visit the <a href="https://domino-workflows.io/gallery" target="_blank" rel="noopener noreferrer">Pieces gallery</a>.
Add Pieces repository by URL. To discover available Pieces
repositories, visit the{" "}
<a
href="https://domino-workflows.io/gallery"
target="_blank"
rel="noopener noreferrer"
>
Pieces gallery
</a>
.
</Typography>
<TextField
value={url}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const WorkspaceSecretsCard = () => {
})
.then((response) => {
toast.success("Secret updated.");
handleUpdateWorkspace(response.data);
handleUpdateWorkspace(response?.data);
resetField(`github-token-workspace-${workspace?.id}`, {
keepTouched: false,
});
Expand Down Expand Up @@ -93,7 +93,7 @@ const WorkspaceSecretsCard = () => {
})
.then((response) => {
toast.success("Secret updated.");
handleUpdateWorkspace(response.data);
handleUpdateWorkspace(response?.data);
})
.catch((_err) => {
toast.error("Error while updating secrets");
Expand Down

0 comments on commit ba0cd24

Please sign in to comment.