Update scroll restoration logic in suspense fixture (#13437)

This commit is contained in:
Matt Hamlin
2018-08-20 14:01:12 -07:00
committed by Sophie Alpert
parent d670bdc6b1
commit 3cae7543be
@@ -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);
}