fixed bug in SearchPage

This commit is contained in:
Ken Jannette
2018-04-21 15:09:58 -04:00
parent 6dca84899f
commit 8137b0b7a9

View File

@@ -13,11 +13,10 @@ class SearchPage extends Component {
onSearch = (query) => { onSearch = (query) => {
const books = this.props.books const books = this.props.books
// console.log(books)
if (query.length > 3) { if (query.length > 3) {
search(query).then((results) => { search(query).then((results) => {
for (result in results) { for (var result in results) {
for (book in books) { for (var book in books) {
if (result === book) { if (result === book) {
result.shelf = book.shelf result.shelf = book.shelf
} }