mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05: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
|
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