storybook/docs/gatsby-browser.js
Norbert de Langen da961dc508 FIX linting
2017-06-03 21:06:48 +02:00

12 lines
230 B
JavaScript

const global = require('global');
const document = global;
exports.onRouteUpdate = location => {
if (location.hash) {
setTimeout(() => {
document.querySelector(`${location.hash}`).scrollIntoView();
}, 0);
}
};