Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-dev committed Apr 25, 2020
1 parent 5167a9e commit be3d1c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/ShelfChanger.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ const ShelfChanger = (props) => {
const shelf = shelves.find((shelf) =>
shelf.books.find((b) => b.id === book.id)
);
return (shelf && shelf.id) || noShelf.id;
return shelf || noShelf;
};

return (
<div className="book-shelf-changer">
<select value={getShelf(book)} onChange={handleShelfChange}>
<select value={getShelf(book).id} onChange={handleShelfChange}>
{shelves.map((shelf) => {
return (
<option key={shelf.id} value={shelf.id}>
Expand Down

0 comments on commit be3d1c1

Please sign in to comment.