Skip to content

Commit

Permalink
fixed trim bug if there is no imdb link
Browse files Browse the repository at this point in the history
  • Loading branch information
kristjanmik committed Nov 8, 2013
1 parent 095e8b3 commit 60f939d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion endpoints/cinema/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ app.get('/cinema', function (req, res, next) {
released: movie.find('.mynd_titill_artal').text().match(/\d+/g)[0].trim(),
restricted: movie.find('.mynd_aldurstakmark img').attr('alt').trim(),
imdb: movie.find('.imdbEinkunn').text().trim(),
imdbLink: movie.find('.imdbEinkunn a').attr('href').trim(),
imdbLink: movie.find('.imdbEinkunn a').attr('href') ? movie.find('.imdbEinkunn a').attr('href').trim() : '',
image: 'http://kvikmyndir.is' + imgURL,
showtimes: showtimes
});
Expand Down

0 comments on commit 60f939d

Please sign in to comment.