This commit is contained in:
Ken Jannette
2018-04-21 16:16:17 -04:00
parent 8137b0b7a9
commit 1a84c1b333
3 changed files with 4 additions and 6 deletions

View File

@@ -15,10 +15,10 @@ class SearchPage extends Component {
const books = this.props.books
if (query.length > 3) {
search(query).then((results) => {
for (var result in results) {
for (var book in books) {
if (result === book) {
result.shelf = book.shelf
for (var i = 0; i < books.length; i++) {
for (var j = 0; j < results.length; j++) {
if (results[j] === books[i]) {
results[j].shelf = books[i].shelf
}
}
}