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:
parent
2536c40517
commit
0f845a3218
@ -5,9 +5,9 @@ import fs from "fs"
|
|||||||
export const Node = {
|
export const Node = {
|
||||||
isFile: function(filename) {
|
isFile: function(filename) {
|
||||||
try {
|
try {
|
||||||
return fs.lstatSync(filename).isFile()
|
return fs.existsSync(filename)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err)
|
console.error(err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user