File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/components/FormSelectList Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -81,10 +81,14 @@ export default {
8181 getOptionAriaLabel (option ) {
8282 let ariaLabel = ' ' ;
8383 if (this .optionsExtra ? .length ) {
84- const optionExtra = this .optionsExtra .find (extra => extra[this .optionValue ] === option[this .optionValue ]);
85- ariaLabel = optionExtra[this .optionAriaLabel || " ariaLabel" ];
84+ const optionExtra = this .optionsExtra .find (extra =>
85+ extra .hasOwnProperty (this .optionValue ) &&
86+ extra[this .optionValue ] === option[this .optionValue ]);
87+ if (optionExtra) {
88+ ariaLabel = optionExtra[this .optionAriaLabel || " ariaLabel" ] ?? ' ' ;
89+ }
8690 } else {
87- ariaLabel = option[this .optionAriaLabel || " ariaLabel" ];
91+ ariaLabel = option[this .optionAriaLabel || " ariaLabel" ] ?? ' ' ;
8892 }
8993 return (! ariaLabel || ariaLabel === " " ) ? this .getOptionContent (option) : ariaLabel;
9094 },
You can’t perform that action at this time.
0 commit comments