Skip to content

Commit acea963

Browse files
committed
fja;osiduf
1 parent 3cdb027 commit acea963

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

modules/RestoreScroll.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const RestoreScroll = React.createClass({
2121
unregisterScroller(this.props.scrollKey)
2222
},
2323

24-
2524
render() {
2625
return React.Children.only(this.props.children)
2726
}

modules/RestoreWindowScroll.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ const RestoreWindowScroll = React.createClass({
88
},
99

1010
componentDidUpdate(prevProps) {
11-
const { location } = this.props
12-
if (prevProps.location !== this.props.location) {
13-
this.props.restoreWindow(location)
14-
}
11+
if (prevProps.location !== this.props.location)
12+
this.props.restoreWindow(this.props.location)
1513
},
1614

1715
render() {
18-
return this.props.children
16+
return React.Children.only(this.props.children)
1917
}
18+
2019
})
2120

2221
export default RestoreWindowScroll

modules/useHistoryRestoreScroll.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ const useHistoryRestoreScroll = (createHistory) => (
3333
//
3434
// ```
3535
// {
36-
// [location.key]: {
36+
// [currentScrollKey]: {
3737
// window: { scrollX, scrollY },
3838
// [scrollKey]: { scrollTop, scrollLeft }
3939
// },
40-
// [location.key]: etc...
40+
// [currentScrollKey]: etc...
4141
// }
4242
// ```
4343
const positionsByLocation = {}

0 commit comments

Comments
 (0)