1
0
mirror of https://github.com/storybookjs/storybook.git synced 2025-03-21 05:02:39 +08:00
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);
}
};