Fix no window location hash bug.

Uncaught TypeError: Cannot read property 'scrollIntoView' of undefined