v1.18.x
Julian Lam 11 years ago
parent f3b2771802
commit 1e7adda054

@ -251,14 +251,19 @@ var fs = require('fs'),
var paths = jsPath.split('/'),
mappedPath = paths[1];
jsPath = jsPath.replace(path.join('plugins', mappedPath), '');
return path.join(plugins.staticDirs[mappedPath], jsPath);
if (plugins.staticDirs[mappedPath]) {
jsPath = jsPath.replace(path.join('plugins', mappedPath), '');
return path.join(plugins.staticDirs[mappedPath], jsPath);
} else {
winston.warn('[meta.scripts.get] Could not resolve mapped path: ' + mappedPath + '. Are you sure it is defined by a plugin?');
return null;
}
} else {
return path.join(__dirname, '..', '/public', jsPath);
}
});
Meta.js.scripts = jsPaths;
Meta.js.scripts = jsPaths.filter(function(path) { return path !== null });
if (process.env.NODE_ENV !== 'development') {
async.parallel({

Loading…
Cancel
Save