Commit 86f60881 authored by Ori Pomerantz's avatar Ori Pomerantz

fix(docs/op-stack): Try to fix the reload code

parent 30a5aa10
......@@ -13,7 +13,12 @@ export default ({ router }) => {
// the refresh button. For more details see:
// https://linear.app/optimism/issue/FE-1003/investigate-archive-issue-on-docs
const registerAutoReload = () => {
event.$on('sw-updated', e => e.skipWaiting().then(() => {
location.reload(true);
}))
event.$on('sw-updated', e => {
e.skipWaiting().then(() =>
{
if (typeof location !== 'undefined')
location.reload(true);
}
)
})
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment