diff --git a/indefero/www/media/idf/js/projectsearch.js b/indefero/www/media/idf/js/projectsearch.js index 81387b2..364058e 100644 --- a/indefero/www/media/idf/js/projectsearch.js +++ b/indefero/www/media/idf/js/projectsearch.js @@ -2,8 +2,9 @@ $(document).ready(function() { $("#prjname").keydown(function(ev) { - if(ev.which === 13) { - window.location.replace($('.projectitem :visible').first().attr("href")); + var link = $('.projectitem :visible').first().attr("href"); + if(ev.which === 13 && link != undefined) { + window.location.replace(link); } });