Skip to content

Commit

Permalink
Fix: inview respecting locks on window resize (#612)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverfoster authored Jan 7, 2025
1 parent a1b6c57 commit 5145a85
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/inview.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,14 @@
}
}
function process() {
if (isLocked()) return;
const registeredCount = registered.length;
if (registeredCount === 0) return;
const executables = registered.slice(0)
executables.forEach(processItem);
}
function processItem(item) {
if (isLocked()) return;
const measurement = getMeasurement(item.element);
const uniqueMeasurementId = measurement.uniqueMeasurementId;
const hasMeasureChanged = (
Expand Down

0 comments on commit 5145a85

Please sign in to comment.