fix loading pty.js in local version

pull/134/merge
nightwing 2015-09-03 10:29:12 +04:00
rodzic 04401d2ce2
commit 220c267e44
1 zmienionych plików z 5 dodań i 3 usunięć

8
node_modules/c9/setup_paths.js wygenerowano vendored
Wyświetl plik

@ -13,9 +13,11 @@ modules._resolveFilename = function(request, parent) {
// Ensure client extensions can be loaded
request = request.replace(/^lib\//, "node_modules/");
// ensure we never use node_modules outside of root dir
parent.paths = parent.paths.filter(function(p) {
return p.indexOf(root) == 0
});
if (parent.paths[0] && parent.paths[0].indexOf(root) == 0) {
parent.paths = parent.paths.filter(function(p) {
return p.indexOf(root) == 0;
});
}
// Add the extra paths
extraPaths.forEach(function(p) {
if (parent.paths.indexOf(p) === -1)