Comparing version 1.2.1 to 1.2.2
@@ -165,8 +165,7 @@ /*! | ||
var root = this.data.root; | ||
if (!root) { | ||
return []; | ||
var queue = []; | ||
if (root) { | ||
queue.push(root); | ||
} | ||
var queue = [root]; | ||
while (queue.length) { | ||
@@ -173,0 +172,0 @@ var node = queue.pop(); |
@@ -144,8 +144,7 @@ var InvalidIntervalError = require('./InvalidIntervalError'); | ||
var root = this.data.root; | ||
if (!root) { | ||
return []; | ||
var queue = []; | ||
if (root) { | ||
queue.push(root); | ||
} | ||
var queue = [root]; | ||
while (queue.length) { | ||
@@ -152,0 +151,0 @@ var node = queue.pop(); |
{ | ||
"name": "insection", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "A data structure for storing number intervals", | ||
@@ -5,0 +5,0 @@ "main": "lib/insection.js", |
@@ -490,2 +490,7 @@ var Insection = require('../lib/Insection.js'); | ||
it('returns the entire interval if the given interval does not overlap with any intervals', function () { | ||
var insection = new Insection(); | ||
expect(insection.getGaps(0, 10), 'to equal', [Insection.interval(0, 10)]); | ||
}); | ||
it('returns an empty array if the insection contains no gaps for the given interval', function () { | ||
@@ -492,0 +497,0 @@ var insection = new Insection(); |
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
108774
2172