fix isFile bug

was previously using `fs.lstatSync().isFile()`. The `isFile()` method doesnt seem to exist so i went with `fs.existsSync()` instead.
This commit is contained in:
Triston Armstrong 2023-12-23 20:12:31 -06:00
parent 2536c40517
commit 0f845a3218

View File

@ -5,9 +5,9 @@ import fs from "fs"
export const Node = {
isFile: function(filename) {
try {
return fs.lstatSync(filename).isFile()
return fs.existsSync(filename)
} catch (err) {
console.log(err)
console.error(err)
return false
}