mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Don't filter errored nodes in result list
This commit is contained in:
parent
ea89aff3db
commit
c98b9dfaa3
@ -589,7 +589,11 @@ function loadNodeModule(node) {
|
|||||||
function loadNodeList(nodes) {
|
function loadNodeList(nodes) {
|
||||||
var promises = [];
|
var promises = [];
|
||||||
nodes.forEach(function(node) {
|
nodes.forEach(function(node) {
|
||||||
promises.push(loadNodeModule(node));
|
if (!node.err) {
|
||||||
|
promises.push(loadNodeModule(node));
|
||||||
|
} else {
|
||||||
|
promises.push(node);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return when.settle(promises).then(function(results) {
|
return when.settle(promises).then(function(results) {
|
||||||
|
@ -361,11 +361,14 @@ describe('NodeRegistry', function() {
|
|||||||
typeRegistry.load("wontexist",true).then(function(){
|
typeRegistry.load("wontexist",true).then(function(){
|
||||||
var list = typeRegistry.getNodeList();
|
var list = typeRegistry.getNodeList();
|
||||||
list.should.be.an.Array.and.be.empty;
|
list.should.be.an.Array.and.be.empty;
|
||||||
typeRegistry.addNode(resourcesDir + "DoesNotExist/DoesNotExist.js").then(function(node) {
|
typeRegistry.addNode(resourcesDir + "DoesNotExist/DoesNotExist.js").then(function(nodes) {
|
||||||
done(new Error("ENOENT not thrown"));
|
nodes.should.be.an.Array.and.have.lengthOf(1);
|
||||||
}).otherwise(function(e) {
|
nodes[0].should.have.property("id");
|
||||||
e.code.should.eql("ENOENT");
|
nodes[0].should.have.property("types",[]);
|
||||||
|
nodes[0].should.have.property("err");
|
||||||
done();
|
done();
|
||||||
|
}).otherwise(function(e) {
|
||||||
|
done(e);
|
||||||
});
|
});
|
||||||
|
|
||||||
}).catch(function(e) {
|
}).catch(function(e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user