sdpi-components icon indicating copy to clipboard operation
sdpi-components copied to clipboard

fix: error when `checkbox-list` receives invalid data

Open luc122c opened this issue 3 months ago • 0 comments

Hi There, I came across an error when switching from the <sdpi-select> component to <sdpi-checkbox-list>. Becasue the data persisted in the setting was a string and not an array, I was getting an error along the lines of

TypeError: 'findIndex' does not exist on 'this.value'

Although I can't see this ever affecting end-users at runtime, I think it would be beneficial to prevent this issue by first checking if the data is an Array by using Array.isArray(). There is already a fallback in place for when this condition fails.

luc122c avatar Sep 15 '25 16:09 luc122c