Merge pull request #2222 from node-red/no-empty-examples

Ignore empty examples directories (don't add to import menu)
This commit is contained in:
Nick O'Leary 2019-06-29 21:32:07 +01:00 committed by GitHub
commit a974e84ad1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,6 @@ function getFlowsFromPath(path) {
}
i++;
})
resolve(result);
})
});
@ -61,6 +60,7 @@ function getFlowsFromPath(path) {
function addNodeExamplesDir(module,path) {
exampleRoots[module] = path;
return getFlowsFromPath(path).then(function(result) {
if (JSON.stringify(result).indexOf('{"f":') === -1) { return; }
exampleFlows = exampleFlows||{};
exampleFlows[module] = result;
});