You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<html><head><scriptsrc="https://cdn.jsdelivr.net/npm/uikit@3.20.8/dist/js/uikit.min.js"></script></head><body><divuk-slider="center: true"><ulclass="uk-slider-items"><!-- issue happens when there are no <li>'s --></ul></div></body></html>
davidebbo
changed the title
uk-slide gets into an infinite loop if there are not <li> takes in a <ul>
uk-slider gets into an infinite loop if there are not <li> takes in a <ul>
May 4, 2024
Here is a complete very minimized repro:
It gets into an infinite loop in
uikit/src/js/components/slider.js
Lines 230 to 236 in a82d76e
Basically,
slides
is an empty list,slide
is undefined, anddimensions(slide).width
is 0. This causeswidth
to never go down, hence the infinite loop.In my real app, I have some
<li>
that are dynamically generated, so the problem happens when the DB data causes the<li>
list to be empty.Relates to OneZoom/OZtree#851
The text was updated successfully, but these errors were encountered: