Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "snabbdom", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A virtual DOM library with focus on simplicity, modularity, powerful features and performance.", | ||
@@ -5,0 +5,0 @@ "main": "snabbdom.js", |
@@ -97,6 +97,6 @@ // jshint newcap: false | ||
function invokeDestroyHook(vnode) { | ||
var i = vnode.data.hook, j; | ||
if (!isUndef(i) && !isUndef(j = i.destroy)) j(vnode); | ||
var i = vnode.data, j; | ||
if (!isUndef(i) && !isUndef(i = i.hook) && !isUndef(i = i.destroy)) i(vnode); | ||
for (i = 0; i < cbs.destroy.length; ++i) cbs.destroy[i](vnode); | ||
if (!isUndef(vnode.children)) { | ||
if (!isUndef(i = vnode.children)) { | ||
for (j = 0; j < vnode.children.length; ++j) { | ||
@@ -116,4 +116,4 @@ invokeDestroyHook(vnode.children[j]); | ||
invokeDestroyHook(ch); | ||
if (ch.data.hook && ch.data.hook.remove) { | ||
ch.data.hook.remove(ch, rm); | ||
if (!isUndef(i = ch.data) && !isUndef(i = i.hook) && !isUndef(i = i.remove)) { | ||
i(ch, rm); | ||
} else { | ||
@@ -120,0 +120,0 @@ rm(); |
@@ -596,2 +596,10 @@ var assert = require('assert'); | ||
}); | ||
it('handles text vnodes with `undefined` `data` property', function() { | ||
var vnode1 = h('div', [ | ||
' ' | ||
]); | ||
var vnode2 = h('div', []); | ||
patch(vnode0, vnode1); | ||
patch(vnode1, vnode2); | ||
}); | ||
it('invokes `destroy` module hook for all removed children', function() { | ||
@@ -598,0 +606,0 @@ var created = 0; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
446084
30
9333
12