File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,14 @@ class default_1 extends Controller {
199
199
areOptionsEquivalent ( newOptions ) {
200
200
const filteredOriginalOptions = this . originalOptions . filter ( ( option ) => option . value !== '' ) ;
201
201
const filteredNewOptions = newOptions . filter ( ( option ) => option . value !== '' ) ;
202
+ const originalPlaceholderOption = this . originalOptions . find ( ( option ) => option . value === '' ) ;
203
+ const newPlaceholderOption = newOptions . find ( ( option ) => option . value === '' ) ;
204
+ console . log ( originalPlaceholderOption , newPlaceholderOption ) ;
205
+ if ( originalPlaceholderOption &&
206
+ newPlaceholderOption &&
207
+ originalPlaceholderOption . text !== newPlaceholderOption . text ) {
208
+ return false ;
209
+ }
202
210
if ( filteredOriginalOptions . length !== filteredNewOptions . length ) {
203
211
return false ;
204
212
}
Original file line number Diff line number Diff line change @@ -429,6 +429,17 @@ export default class extends Controller {
429
429
const filteredOriginalOptions = this . originalOptions . filter ( ( option ) => option . value !== '' ) ;
430
430
const filteredNewOptions = newOptions . filter ( ( option ) => option . value !== '' ) ;
431
431
432
+ const originalPlaceholderOption = this . originalOptions . find ( ( option ) => option . value === '' ) ;
433
+ const newPlaceholderOption = newOptions . find ( ( option ) => option . value === '' ) ;
434
+ console . log ( originalPlaceholderOption , newPlaceholderOption ) ;
435
+ if (
436
+ originalPlaceholderOption &&
437
+ newPlaceholderOption &&
438
+ originalPlaceholderOption . text !== newPlaceholderOption . text
439
+ ) {
440
+ return false ;
441
+ }
442
+
432
443
if ( filteredOriginalOptions . length !== filteredNewOptions . length ) {
433
444
return false ;
434
445
}
You can’t perform that action at this time.
0 commit comments