Skip to content
Snippets Groups Projects
Commit 1646f622 authored by Clworld's avatar Clworld Committed by Eugen Rochko
Browse files

fix scroll position (#4821)

parent e0cda4a8
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@ import IntersectionObserverArticle from './intersection_observer_article';
import LoadMore from './load_more';
import IntersectionObserverWrapper from '../features/ui/util/intersection_observer_wrapper';
import { throttle } from 'lodash';
import { List as ImmutableList } from 'immutable';
export default class ScrollableList extends PureComponent {
......@@ -95,7 +96,12 @@ export default class ScrollableList extends PureComponent {
getFirstChildKey (props) {
const { children } = props;
const firstChild = Array.isArray(children) ? children[0] : children;
let firstChild = children;
if (children instanceof ImmutableList) {
firstChild = children.get(0);
} else if (Array.isArray(children)) {
firstChild = children[0];
}
return firstChild && firstChild.key;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment