htmlstreamofficial / preline

Preline UI is an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework.
https://preline.co
MIT License
3.96k stars 263 forks source link

TypeError: Cannot read properties of undefined (reading 'length') #343

Closed MuhammadSawalhy closed 2 months ago

MuhammadSawalhy commented 2 months ago

My Preline version is ^2.0.3. This is the first time to see this issue. Happened after navigating from one page to another.

image

Unhandled Runtime Error
TypeError: Cannot read properties of undefined (reading 'length')

Call Stack
length
node_modules/preline/preline.js (49:6295)
accessibility
node_modules/preline/preline.js (49:5382)

The exact line of code is too long to put here, but here is a screenshot:

image

t.element.el.classList.contains("open")}));if(e&&(c.DROPDOWN_ACCESSIBILITY_KEY_SET.includes(t.code)||4===t.code.length&&t.co
// exactly at (t.code.length)
jahaganiev commented 2 months ago

Please try out with the latest version. If you are still having an issue, please provide a link to StackBlitz with your setup sources for other members to debug. Thanks!