Skip to content

Commit 0009557

Browse files
jlukicCopilot
andauthored
Bug: Fix logic in fallbacks tested
Co-authored-by: Copilot <[email protected]>
1 parent b035686 commit 0009557

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/behaviors/attach/attach.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ const createBehavior = ({ $, $el, el, self, attachEvent, cache, settings, dispat
412412
debug('Starting search from', currentPosition);
413413
self.startFallbackSearch(currentPosition);
414414
}
415-
if (self.fallbacksTested > 15 || self.fallbackPositions?.length > 0) {
415+
if (self.fallbacksTested < 15 && self.fallbackPositions?.length > 0) {
416416
const nextPosition = self.fallbackPositions.shift();
417417
self.fallbacksTested++;
418418
if (isNumber(nextPosition)) {

0 commit comments

Comments
 (0)