From 3cae7543be5eecf4d9b70bc366b79a402044e0ec Mon Sep 17 00:00:00 2001 From: Matt Hamlin Date: Mon, 20 Aug 2018 17:01:12 -0400 Subject: [PATCH] Update scroll restoration logic in suspense fixture (#13437) --- fixtures/unstable-async/suspense/src/components/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fixtures/unstable-async/suspense/src/components/App.js b/fixtures/unstable-async/suspense/src/components/App.js index 6c639487c0..1c8df3c109 100644 --- a/fixtures/unstable-async/suspense/src/components/App.js +++ b/fixtures/unstable-async/suspense/src/components/App.js @@ -21,7 +21,7 @@ export default class App extends PureComponent { componentDidUpdate(prevProps, prevState) { if ( prevState.showDetail !== this.state.showDetail || - prevState.currentId !== this.state.currentId + (prevState.currentId !== this.state.currentId && this.state.showDetail) ) { window.scrollTo(0, 0); }