Skip to content

Commit

Permalink
fix: do not let the page crash when data is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
emielwit committed Dec 11, 2024
1 parent 3e4d4e6 commit c3294cf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/actionJSForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,8 @@
if (error) {
return <span>Something went wrong: {error.message}</span>;
}
const { id } = data;

return <FormComponent record={id} />;
return <FormComponent record={data?.id} />;
}}
</GetOne>
);
Expand Down

0 comments on commit c3294cf

Please sign in to comment.