happy-dom
Advanced tools
Comparing version 0.8.1 to 0.8.2
@@ -148,7 +148,7 @@ "use strict"; | ||
get: function () { | ||
var previousSibling = this.previousSibling; | ||
while (previousSibling !== null && previousSibling.nodeType !== NodeType_1.default.ELEMENT_NODE) { | ||
previousSibling = this.previousSibling; | ||
var sibling = this.previousSibling; | ||
while (sibling && sibling.nodeType !== NodeType_1.default.ELEMENT_NODE) { | ||
sibling = sibling.previousSibling; | ||
} | ||
return previousSibling; | ||
return sibling; | ||
}, | ||
@@ -165,7 +165,7 @@ enumerable: true, | ||
get: function () { | ||
var nextSibling = this.nextSibling; | ||
while (nextSibling !== null && nextSibling.nodeType !== NodeType_1.default.ELEMENT_NODE) { | ||
nextSibling = this.nextSibling; | ||
var sibling = this.nextSibling; | ||
while (sibling && sibling.nodeType !== NodeType_1.default.ELEMENT_NODE) { | ||
sibling = sibling.nextSibling; | ||
} | ||
return nextSibling; | ||
return sibling; | ||
}, | ||
@@ -172,0 +172,0 @@ enumerable: true, |
{ | ||
"name": "happy-dom", | ||
"version": "0.8.1", | ||
"version": "0.8.2", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/capricorn86/happy-dom#readme", |
@@ -125,7 +125,7 @@ import NodeType from './NodeType'; | ||
public get previousElementSibling(): Node { | ||
let previousSibling = this.previousSibling; | ||
while(previousSibling !== null && previousSibling.nodeType !== NodeType.ELEMENT_NODE) { | ||
previousSibling = this.previousSibling; | ||
let sibling = this.previousSibling; | ||
while(sibling && sibling.nodeType !== NodeType.ELEMENT_NODE) { | ||
sibling = sibling.previousSibling; | ||
} | ||
return previousSibling; | ||
return sibling; | ||
} | ||
@@ -139,7 +139,7 @@ | ||
public get nextElementSibling(): Node { | ||
let nextSibling = this.nextSibling; | ||
while(nextSibling !== null && nextSibling.nodeType !== NodeType.ELEMENT_NODE) { | ||
nextSibling = this.nextSibling; | ||
let sibling = this.nextSibling; | ||
while(sibling && sibling.nodeType !== NodeType.ELEMENT_NODE) { | ||
sibling = sibling.nextSibling; | ||
} | ||
return nextSibling; | ||
return sibling; | ||
} | ||
@@ -146,0 +146,0 @@ |
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
476378