Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
pass tests
  • Loading branch information
mmahalwy committed May 1, 2016
commit 6305bec73e684b8400b43701a97eeba2c78fe01f
1 change: 0 additions & 1 deletion src/components/LazyLoad/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export default class LazyLoad extends Component {
const dom = ReactDOM.findDOMNode(this);

if ((!isLoading && !isEnd) && (dom.offsetParent || dom).offsetTop - (window.pageYOffset + window.innerHeight) < offset) {
debugger;
debug('component:LazyLoad', 'onLazyLoad called');
return this.props.onLazyLoad();
}
Expand Down
6 changes: 0 additions & 6 deletions src/components/LazyLoad/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,4 @@ describe('<LazyLoad />', () => {
wrapper.instance().onScroll();
expect(wrapper.props().onLazyLoad).not.to.have.been.called;
});

it('should not call onLazyLoad when not in scroll position', () => {
window.pageYOffset = -2000;
wrapper.instance().onScroll();
expect(wrapper.props().onLazyLoad).not.to.have.been.called;
});
});