Skip to content

Commit

Permalink
Ensure grid is on when articles are returned
Browse files Browse the repository at this point in the history
Relates to #59
  • Loading branch information
Nicos committed Mar 29, 2018
1 parent 603e07a commit 73a8ad7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions public/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function displayResults(error, articles) {
sectionResults.style.display = "block";
sectionResults.innerHTML = '<h3>No results found! <br> Please try another search query</h3>';
} else {
sectionResults.style.display = "grid";
for (var i = 0; i < articles.length; i++) {
if (articles[i].urlToImage && articles[i].urlToImage.startsWith("http")) {
var newsArticle = document.createElement("article");
Expand Down

0 comments on commit 73a8ad7

Please sign in to comment.