Skip to content

fix(table): table should be able to handle an empty multiSortMeta#19573

Open
FOCJules wants to merge 1 commit into
primefaces:masterfrom
FOCJules:fix/multiSortMetaEmptyArray
Open

fix(table): table should be able to handle an empty multiSortMeta#19573
FOCJules wants to merge 1 commit into
primefaces:masterfrom
FOCJules:fix/multiSortMetaEmptyArray

Conversation

@FOCJules
Copy link
Copy Markdown

@FOCJules FOCJules commented May 11, 2026

Fixes: #19572

Problem

The table currently logs an error, when the multiSortMeta is, for some reason, an empty array. Since [] is a truthy value, the check does not guard against it and therefore, trying to access an index on the empty array leads to the error.

What changed

Improved the check to include a .length > 0 check, to avoid accessing an invalid index

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Table: Multisort tries to access invalid index

1 participant