Skip to content

Commit a87fc2b

Browse files
committed
Release 2.7.7
1 parent ad6bbe2 commit a87fc2b

File tree

7 files changed

+26
-2
lines changed

7 files changed

+26
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ Changelog
33

44
# 2.x
55

6+
## 2.7.7
7+
- Fix stale build
8+
69
## 2.7.6
710
- Fix typescript type definition
11+
- handle empty optgroups
812

913
## 2.7.5
1014
- Fix issue where empty optgroup in select prevents proper diffing

dist/morphdom-esm.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,11 @@ var specialElHandlers = {
266266
if (nodeName === 'OPTGROUP') {
267267
optgroup = curChild;
268268
curChild = optgroup.firstChild;
269+
// handle empty optgroups
270+
if (!curChild) {
271+
curChild = optgroup.nextSibling;
272+
optgroup = null;
273+
}
269274
} else {
270275
if (nodeName === 'OPTION') {
271276
if (curChild.hasAttribute('selected')) {

dist/morphdom-factory.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,11 @@ var specialElHandlers = {
204204
if (nodeName === 'OPTGROUP') {
205205
optgroup = curChild;
206206
curChild = optgroup.firstChild;
207+
// handle empty optgroups
208+
if (!curChild) {
209+
curChild = optgroup.nextSibling;
210+
optgroup = null;
211+
}
207212
} else {
208213
if (nodeName === 'OPTION') {
209214
if (curChild.hasAttribute('selected')) {

dist/morphdom-umd.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,11 @@
272272
if (nodeName === 'OPTGROUP') {
273273
optgroup = curChild;
274274
curChild = optgroup.firstChild;
275+
// handle empty optgroups
276+
if (!curChild) {
277+
curChild = optgroup.nextSibling;
278+
optgroup = null;
279+
}
275280
} else {
276281
if (nodeName === 'OPTION') {
277282
if (curChild.hasAttribute('selected')) {

dist/morphdom-umd.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/morphdom.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,11 @@ var specialElHandlers = {
268268
if (nodeName === 'OPTGROUP') {
269269
optgroup = curChild;
270270
curChild = optgroup.firstChild;
271+
// handle empty optgroups
272+
if (!curChild) {
273+
curChild = optgroup.nextSibling;
274+
optgroup = null;
275+
}
271276
} else {
272277
if (nodeName === 'OPTION') {
273278
if (curChild.hasAttribute('selected')) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"virtual-dom": "^2.1.1"
5353
},
5454
"dependencies": {},
55-
"version": "2.7.6",
55+
"version": "2.7.7",
5656
"keywords": [
5757
"dom",
5858
"diff",

0 commit comments

Comments
 (0)