Update scroll restoration logic in suspense fixture (#13437)

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