File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -459,7 +459,8 @@ function Picker({
459459 const normalizeText = ( text ) => text . normalize ( "NFD" ) . replace ( / [ \u0300 - \u036f ] / g, "" ) ;
460460
461461 let results = sortedItems . filter ( item => {
462- const label = item [ _schema . label ] . toLowerCase ( ) ;
462+ const label = String ( item [ _schema . label ] ) . toLowerCase ( ) ;
463+
463464 if (
464465 label . includes ( searchText . toLowerCase ( ) )
465466 || searchWithRegionalAccents && normalizeText ( label ) . includes ( searchText . toLowerCase ( ) )
@@ -481,7 +482,7 @@ function Picker({
481482 results . splice ( index , 0 , parent ) ;
482483 } ) ;
483484
484- if ( ( results . length === 0 || results . findIndex ( item => item [ _schema . label ] . toLowerCase ( ) === searchText . toLowerCase ( ) ) === - 1 ) && addCustomItem ) {
485+ if ( ( results . length === 0 || results . findIndex ( item => String ( item [ _schema . label ] ) . toLowerCase ( ) === searchText . toLowerCase ( ) ) === - 1 ) && addCustomItem ) {
485486 results . push ( {
486487 [ _schema . label ] : searchText ,
487488 [ _schema . value ] : searchText . replace ( ' ' , '-' ) ,
You can’t perform that action at this time.
0 commit comments