mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fix(installer): moved to ES6 syntax
This commit is contained in:
@@ -204,17 +204,16 @@ makeInstaller = function (options) {
|
||||
}
|
||||
|
||||
function makeMissingError(id) {
|
||||
var path = String(id)
|
||||
const path = String(id)
|
||||
.split('/');
|
||||
var importsFromServer = path.some(function (id) {
|
||||
return id.indexOf('server') !== -1;
|
||||
});
|
||||
var importsFromClient = path.some(function (id) {
|
||||
return id.indexOf('client') !== -1;
|
||||
});
|
||||
if (importsFromServer || importsFromClient) {
|
||||
|
||||
const importsFrom = (location) =>
|
||||
path.some((id) => id.indexOf(location) !== -1);
|
||||
|
||||
if (importsFrom('server') || importsFrom('client')) {
|
||||
return new Error('Cannot import module ' + id + ' \n (cross-boundary import) \n see: https://guide.meteor.com/structure.html#special-directories');
|
||||
}
|
||||
|
||||
return new Error("Cannot find module '" + id + "'");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user