Skip to content

Commit 526a4e6

Browse files
authored
Merge pull request #268 from SteffenDE/sd-empty-optgroup
handle empty optgroups
2 parents b6e3c34 + a2dbc9f commit 526a4e6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/specialElHandlers.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ export default {
8888
if (nodeName === 'OPTGROUP') {
8989
optgroup = curChild;
9090
curChild = optgroup.firstChild;
91+
// handle empty optgroups
92+
if (!curChild) {
93+
curChild = optgroup.nextSibling;
94+
optgroup = null;
95+
}
9196
} else {
9297
if (nodeName === 'OPTION') {
9398
if (curChild.hasAttribute('selected')) {

0 commit comments

Comments
 (0)