Skip to content

Commit

Permalink
unobserve -> disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
caroqliu committed Feb 29, 2020
1 parent 946b218 commit 15988fe
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions extensions/amp-timeago/0.2/timeago.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ export function Timeago(props) {
if (node) {
observer.observe(node);
}
return () => {
if (node) {
observer.unobserve(node);
}
};
return () => observer.disconnect();
}, []);

useResourcesNotify();
Expand Down

0 comments on commit 15988fe

Please sign in to comment.