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:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user