Skip to content

Commit 4eda65d

Browse files
author
Luis Merino
committed
chore(dependencies): upgrade core dependency
1 parent 586329f commit 4eda65d

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://github.com/researchgate/react-intersection-list/issues"
88
},
99
"dependencies": {
10-
"@researchgate/react-intersection-observer": "^0.7.1",
10+
"@researchgate/react-intersection-observer": "^0.7.3",
1111
"prop-types": "^15.6.1",
1212
"react-lifecycles-compat": "^3.0.4",
1313
"warning": "^4.0.1"

src/Sentinel.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ class Sentinel extends Component {
4343
// its threshold prematurely. In this case we don't get any update from the Observer instance.
4444
// We need to guarantee an update, and re-observing is a cheap way to accomplish this.
4545
if (currentRootMargin === rootMargin && currentRootElement === rootElement) {
46-
this.element.reobserve();
46+
this.element.unobserve();
47+
this.element.observe();
4748
return false;
4849
}
4950
return true;

src/__tests__/Sentinel.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ describe('render', () => {
6969
const renderSpy = jest.spyOn(tree.getInstance(), 'render');
7070
const spy = jest.fn();
7171
tree.getInstance().element = {
72-
reobserve: spy,
72+
unobserve: spy,
73+
observe: spy,
7374
};
7475
tree.update(<Sentinel {...defaultProps} />);
7576
expect(renderSpy).not.toBeCalled();

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@
9191
dependencies:
9292
"@researchgate/eslint-config-rg-base" "^2.0.0"
9393

94-
"@researchgate/react-intersection-observer@^0.7.1":
95-
version "0.7.1"
96-
resolved "https://registry.yarnpkg.com/@researchgate/react-intersection-observer/-/react-intersection-observer-0.7.1.tgz#c63d0d133d9f121fc34d5019dd5a0a4d3c87f32a"
94+
"@researchgate/react-intersection-observer@^0.7.3":
95+
version "0.7.3"
96+
resolved "https://registry.yarnpkg.com/@researchgate/react-intersection-observer/-/react-intersection-observer-0.7.3.tgz#cef70feae9ccb33d5104fa8bf4c8c3ddc049d5fa"
9797
dependencies:
9898
invariant "^2.2.2"
9999
prop-types "^15.6.0"

0 commit comments

Comments
 (0)