File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1264,7 +1264,7 @@ function Picker({
12641264
12651265 // Not a reliable method for external value changes.
12661266 if ( multiple ) {
1267- if ( memoryRef . current . value . includes ( item [ _schema . value ] ) ) {
1267+ if ( memoryRef . current . value ? .includes ( item [ _schema . value ] ) ) {
12681268 const index = memoryRef . current . items . findIndex ( x => x [ _schema . value ] === item [ _schema . value ] ) ;
12691269
12701270 if ( index > - 1 ) {
@@ -1280,7 +1280,7 @@ function Picker({
12801280
12811281 setValue ( state => {
12821282 if ( multiple ) {
1283- let _state = state !== null ? [ ...state ] : [ ] ;
1283+ let _state = state !== null && state !== undefined ? [ ...state ] : [ ] ;
12841284
12851285 if ( _state . includes ( item [ _schema . value ] ) ) {
12861286 // Remove the value
You can’t perform that action at this time.
0 commit comments