Skip to content

Commit

Permalink
fix(ViewportProvider): don't trigger duplicate updates for not idled …
Browse files Browse the repository at this point in the history
…events
  • Loading branch information
garthenweb committed Jun 22, 2019
1 parent 18f2eae commit d06e889
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ViewportProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default class ViewportProvider extends React.PureComponent<
const { isIdle } = Object.assign({ isIdle: false }, options);
let updatableListeners = this.listeners.filter(
({ notifyScroll, notifyDimensions, notifyOnlyWhenIdle }) => {
if (notifyOnlyWhenIdle() && !isIdle) {
if (notifyOnlyWhenIdle() !== isIdle) {
return false;
}
const updateForScroll = notifyScroll() && scrollDidUpdate;
Expand Down

0 comments on commit d06e889

Please sign in to comment.