storybook/docs/gatsby-browser.js
Norbert de Langen 341fc2d90d
FIX linting
2020-03-27 20:04:50 +01:00

10 lines
212 B
JavaScript

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