From 239bf528265f469bb9ad56ac0fd751d5cdbb14b7 Mon Sep 17 00:00:00 2001 From: Gary Pang Date: Wed, 20 Dec 2017 21:51:46 -0500 Subject: [PATCH] Add Caribbean cuisine as search form option Issue #7 --- server.js | 2 +- views/partials/searchForm.hbs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 0055c07..9ecb2a5 100644 --- a/server.js +++ b/server.js @@ -143,7 +143,7 @@ app.get('/dba/:id', (req, res) => { // If query string is added to url, console.log(business.dba) works // But console.log(business.dba.toLowerCase()) throws an error // TypeError: Cannot read property 'toLowerCase' of undefined - // Turns out at least one 'business' has type 'undefined' for some reason + // Turns out at least one 'business' has 'undefined' for some reason request(`${url}?boro=queens&zipcode=11358`, (error, response, body) => { var searchResults = JSON.parse(body).filter((business) => { console.log(`${business.dba} is type ${typeof business.dba}`); diff --git a/views/partials/searchForm.hbs b/views/partials/searchForm.hbs index ace27a9..1aa79ca 100644 --- a/views/partials/searchForm.hbs +++ b/views/partials/searchForm.hbs @@ -24,6 +24,7 @@ +