Permalink
Browse files

JS: avoid scrolling to #cNaN with #comments in the URL

  • Loading branch information...
vdboor committed Jan 6, 2013
1 parent 710a7fc commit 4c19eef283b8dde1e0e4b3c1e53654e1e3172b88
Showing with 2 additions and 1 deletion.
  1. +2 −1 fluent_comments/static/fluent_comments/js/ajaxcomments.js
@@ -41,7 +41,8 @@
if( hash.substring(0, 2) == "#c" )
{
var id = parseInt(hash.substring(2));
- scrollToComment(id, 1000);
+ if( ! isNaN(id)) // e.g. #comments in URL
+ scrollToComment(id, 1000);
}
});

0 comments on commit 4c19eef

Please sign in to comment.