Update scroll restoration logic in suspense fixture (#13437)
Matt Hamlin committed
Aug 20, 2018 at 17:01 UTC
3cae7543be5eecf4d9b70bc366b79a402044e0ec
1 file changed
+1
-1
fixtures/unstable-async/suspense/src/components/App.js
+1
-1
@@ -21,7 +21,7 @@ export default class App extends PureComponent {
21
componentDidUpdate(prevProps, prevState) {
22
if (
23
prevState.showDetail !== this.state.showDetail ||
24
- prevState.currentId !== this.state.currentId
24
+ (prevState.currentId !== this.state.currentId && this.state.showDetail)
25
) {
26
window.scrollTo(0, 0);
27
}