Ignore empty examples directories (don't add to import menu)

This commit is contained in:
Dave Conway-Jones 2019-06-23 12:09:43 +01:00
parent d11d389ae4
commit d918bb568c
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
1 changed files with 4 additions and 2 deletions

View File

@ -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];