Skip to content

Commit

Permalink
chore(dependencies): upgrade core dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Merino committed Jun 18, 2018
1 parent 586329f commit 4eda65d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/researchgate/react-intersection-list/issues"
},
"dependencies": {
"@researchgate/react-intersection-observer": "^0.7.1",
"@researchgate/react-intersection-observer": "^0.7.3",
"prop-types": "^15.6.1",
"react-lifecycles-compat": "^3.0.4",
"warning": "^4.0.1"
Expand Down
3 changes: 2 additions & 1 deletion src/Sentinel.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class Sentinel extends Component {
// its threshold prematurely. In this case we don't get any update from the Observer instance.
// We need to guarantee an update, and re-observing is a cheap way to accomplish this.
if (currentRootMargin === rootMargin && currentRootElement === rootElement) {
this.element.reobserve();
this.element.unobserve();
this.element.observe();
return false;
}
return true;
Expand Down
3 changes: 2 additions & 1 deletion src/__tests__/Sentinel.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ describe('render', () => {
const renderSpy = jest.spyOn(tree.getInstance(), 'render');
const spy = jest.fn();
tree.getInstance().element = {
reobserve: spy,
unobserve: spy,
observe: spy,
};
tree.update(<Sentinel {...defaultProps} />);
expect(renderSpy).not.toBeCalled();
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@
dependencies:
"@researchgate/eslint-config-rg-base" "^2.0.0"

"@researchgate/react-intersection-observer@^0.7.1":
version "0.7.1"
resolved "https://registry.yarnpkg.com/@researchgate/react-intersection-observer/-/react-intersection-observer-0.7.1.tgz#c63d0d133d9f121fc34d5019dd5a0a4d3c87f32a"
"@researchgate/react-intersection-observer@^0.7.3":
version "0.7.3"
resolved "https://registry.yarnpkg.com/@researchgate/react-intersection-observer/-/react-intersection-observer-0.7.3.tgz#cef70feae9ccb33d5104fa8bf4c8c3ddc049d5fa"
dependencies:
invariant "^2.2.2"
prop-types "^15.6.0"
Expand Down

0 comments on commit 4eda65d

Please sign in to comment.