浏览代码

Make same-page anchor condition clearer

Alexandre Dieulot 6 年之前
父节点
当前提交
3e1b0b2934
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      instantpage.js

+ 1 - 1
instantpage.js

@@ -102,7 +102,7 @@ function isPreloadable(linkElement) {
     return
   }
 
-  if (urlObject.pathname + urlObject.search == location.pathname + location.search && urlObject.hash) {
+  if (urlObject.hash && urlObject.pathname + urlObject.search == location.pathname + location.search) {
     return
   }