feat(aklive2d): added missing file check

This commit is contained in:
Haoyu Xu
2023-07-29 01:46:15 -04:00
parent 34c8051640
commit 154f2086f3
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)
}