feat(aklive2d): added missing file check

This commit is contained in:
Haoyu Xu
2023-07-29 01:46:15 -04:00
parent 4743ae354d
commit b218cf885c
3 changed files with 46 additions and 4 deletions

View File

@@ -67,5 +67,9 @@ export function appendSync(content, filePath) {
}
export function readdirSync(dir) {
if (!exists(dir)) {
console.warn(`Source ${dir} does not exist.`)
return []
}
return fs.readdirSync(dir)
}