mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-03 14:02:16 +00:00
add function to check for existance of folders
This commit is contained in:
parent
d3ae276091
commit
063187b5fc
1 changed files with 5 additions and 0 deletions
|
@ -335,6 +335,11 @@ define [
|
|||
|
||||
return null
|
||||
|
||||
projectContainsFolder: () ->
|
||||
for entity in @$scope.rootFolder.children
|
||||
return true if entity.type == 'folder'
|
||||
return false
|
||||
|
||||
existsInThisFolder: (folder, name) ->
|
||||
for entity in folder?.children or []
|
||||
return true if entity.name is name
|
||||
|
|
Loading…
Reference in a new issue