diff --git a/packages/gatsby/cache-dir/navigation.js b/packages/gatsby/cache-dir/navigation.js index 632f7c2fc4a5b..62f14b1bbf14c 100644 --- a/packages/gatsby/cache-dir/navigation.js +++ b/packages/gatsby/cache-dir/navigation.js @@ -129,7 +129,10 @@ function shouldUpdateScroll(prevRouterProps, { location }) { // `pathname` for backwards compatibility pathname, routerProps: { location }, - getSavedScrollPosition: args => this._stateStorage.read(args), + getSavedScrollPosition: args => [ + 0, + this._stateStorage.read(args, args.key), + ], }) if (results.length > 0) { // Use the latest registered shouldUpdateScroll result, this allows users to override plugin's configuration