mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 05:11:34 +02:00
Add null check into FileTypeManager isDirectory check
This commit is contained in:
@@ -24,7 +24,8 @@ module.exports = FileTypeManager =
|
||||
|
||||
isDirectory: (path, callback = (error, result) ->) ->
|
||||
fs.stat path, (error, stats) ->
|
||||
callback(error, stats.isDirectory())
|
||||
return callback(error) if error?
|
||||
callback(null, stats?.isDirectory())
|
||||
|
||||
isBinary: (name, fsPath, callback = (error, result) ->) ->
|
||||
parts = name.split(".")
|
||||
|
||||
Reference in New Issue
Block a user