mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
11 lines
396 B
JavaScript
11 lines
396 B
JavaScript
export default function(to, from, savedPosition) {
|
|
if (savedPosition) return savedPosition
|
|
|
|
// Edge case: If you click on a notification from a comment and then on the
|
|
// post page you click on 'comments', we avoid a "jumping" scroll behavior,
|
|
// ie. jump to the top and scroll back from there
|
|
if (to.path === from.path && to.hash !== from.hash) return false
|
|
|
|
return { x: 0, y: 0 }
|
|
}
|