Skip to content

Commit

Permalink
updated: npm dependencies and fixed vulnerabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
GianlucaGuarini committed Aug 1, 2019
1 parent 280794c commit c86f129
Show file tree
Hide file tree
Showing 4 changed files with 184 additions and 125 deletions.
23 changes: 14 additions & 9 deletions dist/esm.dom-bindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,17 @@ function createTemplateMeta(componentTemplate) {
/* get rid of the @ungap/essential-map polyfill */

const append = (get, parent, children, start, end, before) => {
if ((end - start) < 2)
parent.insertBefore(get(children[start], 1), before);
else {
const fragment = parent.ownerDocument.createDocumentFragment();
while (start < end)
fragment.appendChild(get(children[start++], 1));
parent.insertBefore(fragment, before);
const isSelect = 'selectedIndex' in parent;
let selectedIndex = -1;
while (start < end) {
const 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;
};

const eqeq = (a, b) => a == b;
Expand Down Expand Up @@ -907,7 +910,7 @@ const IfBinding = Object.seal({
return this
},
unmount(scope, parentScope) {
this.template.unmount(scope, parentScope);
this.template.unmount(scope, parentScope, true);

return this
}
Expand Down Expand Up @@ -1562,7 +1565,9 @@ const TemplateChunk = Object.freeze({

if (mustRemoveRoot && this.el.parentNode) {
this.el.parentNode.removeChild(this.el);
} else if (mustRemoveRoot !== null) {
}

if (mustRemoveRoot !== null) {
if (this.children) {
clearChildren(this.children[0].parentNode, this.children);
} else {
Expand Down
23 changes: 14 additions & 9 deletions dist/umd.dom-bindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,17 @@
/* get rid of the @ungap/essential-map polyfill */

const append = (get, parent, children, start, end, before) => {
if ((end - start) < 2)
parent.insertBefore(get(children[start], 1), before);
else {
const fragment = parent.ownerDocument.createDocumentFragment();
while (start < end)
fragment.appendChild(get(children[start++], 1));
parent.insertBefore(fragment, before);
const isSelect = 'selectedIndex' in parent;
let selectedIndex = -1;
while (start < end) {
const 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;
};

const eqeq = (a, b) => a == b;
Expand Down Expand Up @@ -913,7 +916,7 @@
return this
},
unmount(scope, parentScope) {
this.template.unmount(scope, parentScope);
this.template.unmount(scope, parentScope, true);

return this
}
Expand Down Expand Up @@ -1568,7 +1571,9 @@

if (mustRemoveRoot && this.el.parentNode) {
this.el.parentNode.removeChild(this.el);
} else if (mustRemoveRoot !== null) {
}

if (mustRemoveRoot !== null) {
if (this.children) {
clearChildren(this.children[0].parentNode, this.children);
} else {
Expand Down
Loading

0 comments on commit c86f129

Please sign in to comment.