fizzy-ui-utils
Advanced tools
Comparing version 2.0.4 to 2.0.5
@@ -9,3 +9,3 @@ { | ||
"dependencies": { | ||
"desandro-matches-selector": "~2.0.0" | ||
"desandro-matches-selector": "^2.0.0" | ||
}, | ||
@@ -12,0 +12,0 @@ "moduleType": [ |
{ | ||
"name": "fizzy-ui-utils", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "UI utilities", | ||
@@ -5,0 +5,0 @@ "main": "utils.js", |
@@ -17,2 +17,15 @@ QUnit.test( 'getParent', function( assert ) { | ||
var treeNotInDocument = document.createElement('div'); | ||
treeNotInDocument.innerHTML = | ||
'<div class="a">' + | ||
'<div class="a1">' + | ||
'</div>'; | ||
parent = getParent( treeNotInDocument.querySelector('.a1'), '.not-found' ); | ||
assert.ok( | ||
parent === undefined, | ||
'Parent should be `undefined` even when the given tree is not in the document' | ||
); | ||
}); |
/** | ||
* Fizzy UI utils v2.0.4 | ||
* Fizzy UI utils v2.0.5 | ||
* MIT license | ||
@@ -88,3 +88,3 @@ */ | ||
utils.getParent = function( elem, selector ) { | ||
while ( elem != document.body ) { | ||
while ( elem.parentNode && elem != document.body ) { | ||
elem = elem.parentNode; | ||
@@ -91,0 +91,0 @@ if ( matchesSelector( elem, selector ) ) { |
Sorry, the diff of this file is not supported yet
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
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
13654
307