mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 03:53:05 -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
|
return null
|
||||||
|
|
||||||
|
projectContainsFolder: () ->
|
||||||
|
for entity in @$scope.rootFolder.children
|
||||||
|
return true if entity.type == 'folder'
|
||||||
|
return false
|
||||||
|
|
||||||
existsInThisFolder: (folder, name) ->
|
existsInThisFolder: (folder, name) ->
|
||||||
for entity in folder?.children or []
|
for entity in folder?.children or []
|
||||||
return true if entity.name is name
|
return true if entity.name is name
|
||||||
|
|
Loading…
Reference in a new issue