We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Map.get
1 parent 47b370d commit 2cd1dafCopy full SHA for 2cd1daf
1 file changed
src/index.mjs
@@ -23,10 +23,8 @@ const observer = new IntersectionObserver(entries => {
23
.filter(entry => entry.isIntersecting)
24
.forEach(entry => {
25
const url = entry.target.href;
26
- if (!loaderFunctions.has(url)) {
27
- return;
28
- }
29
- loaderFunctions.get(url).call(null);
+ const fn = loaderFunctions.get(url);
+ if (fn) fn.call(null);
30
});
31
32
0 commit comments