Skip to content

Commit

Permalink
修正链接跳转判断不完整
Browse files Browse the repository at this point in the history
  • Loading branch information
joyqi committed Mar 15, 2014
1 parent b4c903f commit ee4e483
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion admin/common-js.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function checkScroll () {
$('a').each(function () {
var t = $(this), href = t.attr('href');

if ((href.length > 1 && href[0] == '#')
if ((href && href[0] == '#')
|| /^<?php echo preg_quote($options->adminUrl, '/'); ?>.*$/.exec(href)
|| /^<?php echo substr(preg_quote(Typecho_Common::url('s', $options->index), '/'), 0, -1); ?>action\/[_a-zA-Z0-9\/]+.*$/.exec(href)) {
return;
Expand Down

0 comments on commit ee4e483

Please sign in to comment.