Fix empty string being passed to $.id

This commit is contained in:
Jordan Bates 2013-04-18 08:42:08 -07:00
parent 8926a9636f
commit cdff50fc17
2 changed files with 2 additions and 2 deletions

View File

@ -4798,7 +4798,7 @@
hashScroll: function() {
var post;
if (!(post = $.id(this.location.hash.slice(1)))) {
if (!(post = this.location.hash.slice(1))) {
return;
}
if ((Get.postFromRoot(post)).isHidden) {

View File

@ -178,7 +178,7 @@ Header =
(if hide then $.addClass else $.rmClass) Header.nav, 'autohide'
hashScroll: ->
return unless post = $.id @location.hash[1..]
return unless post = @location.hash[1..]
return if (Get.postFromRoot post).isHidden
Header.scrollToPost post