mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #617 from sharelatex/hb-check-for-folders-clientside
Add function to check for existence of folders
This commit is contained in:
commit
63482e0ea0
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