Commit 9b318507 authored by Renfred Harper's avatar Renfred Harper

Lessen strict equality for null locations

parent d3d795e3
...@@ -15,11 +15,11 @@ function compareTimes(time1, time2) { ...@@ -15,11 +15,11 @@ function compareTimes(time1, time2) {
function dispalyInfo(restaurant) { function dispalyInfo(restaurant) {
// Display restaurant info in the info-body without bracketed locations // Display restaurant info in the info-body without bracketed locations
$('#info-name').text(restaurant.name.replace(/ ?\[(.+)\]/, '')); $('#info-name').text(restaurant.name.replace(/ ?\[(.+)\]/, ''));
if (restaurant.location !== null){ if (restaurant.location == '') {
$('#info-location').html('<b>Location:</b> ' + restaurant.location).show(); $('#info-location').hide();
} }
else { else {
$('#info-location').hide(); $('#info-location').html('<b>Location:</b> ' + restaurant.location).show();
} }
if (restaurant.open){ if (restaurant.open){
$('#info-status').html('<b>Status:</b> Open'); $('#info-status').html('<b>Status:</b> Open');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment