Skip to content

Commit 14f25c7

Browse files
authored
Fix: inview respecting locks on window resize (fixes #612) (#613)
1 parent 3daaae6 commit 14f25c7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libraries/inview.js

+2
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,14 @@
8181
}
8282
}
8383
function process() {
84+
if (isLocked()) return;
8485
const registeredCount = registered.length;
8586
if (registeredCount === 0) return;
8687
const executables = registered.slice(0)
8788
executables.forEach(processItem);
8889
}
8990
function processItem(item) {
91+
if (isLocked()) return;
9092
const measurement = getMeasurement(item.element);
9193
const uniqueMeasurementId = measurement.uniqueMeasurementId;
9294
const hasMeasureChanged = (

0 commit comments

Comments
 (0)