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