提交 3afce9bd 编写于 作者: fxy060608's avatar fxy060608

fix(v3): existsSync(componentsPath)

上级 f514eb09
......@@ -341,7 +341,7 @@ const isDirectory = source => fs.lstatSync(source).isDirectory()
function getAutoComponentsByDir (componentsPath, absolute = false) {
const components = {}
try {
fs.readdirSync(componentsPath).forEach(name => {
fs.existsSync(componentsPath) && fs.readdirSync(componentsPath).forEach(name => {
const folder = path.resolve(componentsPath, name)
if (!isDirectory(folder)) {
return
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册