Skip to content

Commit

Permalink
fix: the rating field is optional when editing the book
Browse files Browse the repository at this point in the history
  • Loading branch information
Franqsanz committed Sep 5, 2024
1 parent 56f1d96 commit 1d70739
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/forms/FormEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ export function FormEdit({
function allFieldsBook(book: BookType): boolean {
return (
Object.entries(book)
.filter(([key]) => key !== 'sourceLink' && key !== 'pathUrl')
.filter(
([key]) => key !== 'sourceLink' && key !== 'pathUrl' && key !== 'rating',
)
.every(([, value]) => value) && book.category.length > 0
);
}
Expand Down

0 comments on commit 1d70739

Please sign in to comment.