diff --git a/src/specialElHandlers.js b/src/specialElHandlers.js index 544efd6..ce213aa 100644 --- a/src/specialElHandlers.js +++ b/src/specialElHandlers.js @@ -88,6 +88,11 @@ export default { if (nodeName === 'OPTGROUP') { optgroup = curChild; curChild = optgroup.firstChild; + // handle empty optgroups + if (!curChild) { + curChild = optgroup.nextSibling; + optgroup = null; + } } else { if (nodeName === 'OPTION') { if (curChild.hasAttribute('selected')) {