Skip to content

Commit

Permalink
amend on previous fix/update
Browse files Browse the repository at this point in the history
  • Loading branch information
WebReflection committed Jul 3, 2019
1 parent 5852e9f commit 1047f13
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions esm.js

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,17 @@ var hyperHTML = (function (document) {
var Map$1 = self$2.Map;

var append = function append(get, parent, children, start, end, before) {
var isSelect = 'selectedIndex' in parent;
var selectedIndex = -1;

while (start < end) {
parent.insertBefore(get(children[start++], 1), before);
var child = get(children[start], 1);
if (isSelect && selectedIndex < 0 && child.selected) selectedIndex = start;
parent.insertBefore(child, before);
start++;
}

if (isSelect && -1 < selectedIndex) parent.selectedIndex = selectedIndex;
};
var eqeq = function eqeq(a, b) {
return a == b;
Expand Down
4 changes: 2 additions & 2 deletions min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"@ungap/template-tag-arguments": "^0.3.0",
"@ungap/weakmap": "^0.1.4",
"disconnected": "^0.2.1",
"domdiff": "^2.0.4",
"domdiff": "^2.0.5",
"domtagger": "^0.4.0",
"hyperhtml-style": "^0.1.2",
"hyperhtml-wire": "^2.1.0",
Expand Down
4 changes: 2 additions & 2 deletions umd.js

Large diffs are not rendered by default.

0 comments on commit 1047f13

Please sign in to comment.