mirror of https://github.com/node-red/node-red.git
Ignore empty examples directories (don't add to import menu)
parent
d11d389ae4
commit
d918bb568c
|
@ -51,7 +51,9 @@ function getFlowsFromPath(path) {
|
|||
}
|
||||
i++;
|
||||
})
|
||||
|
||||
if (!result.hasOwnProperty("f")) {
|
||||
reject(result);
|
||||
}
|
||||
resolve(result);
|
||||
})
|
||||
});
|
||||
|
@ -63,7 +65,7 @@ function addNodeExamplesDir(module,path) {
|
|||
return getFlowsFromPath(path).then(function(result) {
|
||||
exampleFlows = exampleFlows||{};
|
||||
exampleFlows[module] = result;
|
||||
});
|
||||
}, function() { return; });
|
||||
}
|
||||
function removeNodeExamplesDir(module) {
|
||||
delete exampleRoots[module];
|
||||
|
|
Loading…
Reference in New Issue