fix: error throw error

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
MiaoWoo 2019-03-09 10:26:36 +08:00
parent f98814bf2d
commit 8d40a69ac7

View File

@ -240,7 +240,7 @@
file = _isFile(file) ? file : resolve(name, path); file = _isFile(file) ? file : resolve(name, path);
optional = Object.assign({ cache: true }, optional); optional = Object.assign({ cache: true }, optional);
if (file === undefined) { if (file === undefined) {
throw Error("Can't found module", name, 'in directory', path) throw Error("Can't found module" + name + 'in directory' + path)
} }
// 重定向文件名称和类型 // 重定向文件名称和类型
return getCacheModule(_canonical(file), file.name.split(".")[0], file, optional); return getCacheModule(_canonical(file), file.name.split(".")[0], file, optional);