Skip to content

Commit 733e8a2

Browse files
committed
Use hostname instead of host
``link.host`` may also return the port number contrary to ``location.host``
1 parent ae7964d commit 733e8a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jquery.pjax.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function handleClick(event, container, options) {
7070
return
7171

7272
// Ignore cross origin links
73-
if ( location.protocol !== link.protocol || location.host !== link.host )
73+
if ( location.protocol !== link.protocol || location.hostname !== link.hostname )
7474
return
7575

7676
// Ignore anchors on the same page

0 commit comments

Comments
 (0)