mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #3485 from overleaf/ta-file-tree-upload-fix
[ReactFileTree] Fix Upload Button When No Entities Are Selected GitOrigin-RevId: d7438ccee741c21190deaddc376c6f394870de42
This commit is contained in:
parent
16a715c816
commit
d8469953f1
1 changed files with 5 additions and 4 deletions
|
@ -248,10 +248,11 @@ export function useFileTreeActionable() {
|
|||
}
|
||||
|
||||
function startUploadingDocOrFile() {
|
||||
const selectedEntityId = Array.from(selectedEntityIds)[0]
|
||||
const found = findInTreeOrThrow(fileTreeData, selectedEntityId)
|
||||
const parentFolderId =
|
||||
found.type === 'folder' ? found.entity._id : found.parentFolderId
|
||||
const parentFolderId = getSelectedParentFolderId(
|
||||
fileTreeData,
|
||||
selectedEntityIds
|
||||
)
|
||||
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('FileTreeReactBridge.openNewDocModal', {
|
||||
detail: {
|
||||
|
|
Loading…
Reference in a new issue