Skip to content

Commit

Permalink
use text, not html, for option label
Browse files Browse the repository at this point in the history
  • Loading branch information
hinanaya committed Jun 17, 2024
1 parent 0dfd4c7 commit 9445442
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/fields/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,13 +372,13 @@ class OBFieldSelect extends OBField {
if (child.tagName === 'OB-OPTION') {
let key = child.getAttribute('value');
if (key) {
options[key] = child.innerHTML;
options[key] = child.innerText;
} else {
// If you mix items that have a value attribute and items without them, and also
// some of the values are numbers lower than the length of the iterated options up
// to this point, they'll get overwritten, so this causes problems. But also come
// on now.
options[Object.keys(options).length] = child.innerHTML;
options[Object.keys(options).length] = child.innerText;
}
}
});
Expand Down

0 comments on commit 9445442

Please sign in to comment.