mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-23 20:00:58 +00:00
Add null check into FileTypeManager isDirectory check
This commit is contained in:
parent
d4af0fe36d
commit
3578e41c9c
1 changed files with 2 additions and 1 deletions
|
@ -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(".")
|
||||
|
|
Loading…
Reference in a new issue