Skip to content

Commit 9f809d1

Browse files
committed
use call instead of bind with an explicit function call to invoke jumpToAnchor on load
1 parent 92d705d commit 9f809d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/03-fragment-jumper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
var fragment, target
2626
if ((fragment = decodeFragment(window.location.hash)) && (target = document.getElementById(fragment))) {
2727
document.documentElement.style.scrollBehavior = 'auto'
28-
jumpToAnchor.bind(target)()
28+
jumpToAnchor.call(target)
2929
setTimeout(jumpToAnchor.bind(target), 0)
3030
setTimeout(function () {
3131
document.documentElement.style.scrollBehavior = ''

0 commit comments

Comments
 (0)