mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-09 23:10:20 +08:00
fix: lint error
This commit is contained in:
parent
992f8207ec
commit
64213aad6d
@ -10,11 +10,11 @@ import {
|
||||
addDir,
|
||||
addNote,
|
||||
delNode,
|
||||
type FileEntryData,
|
||||
loadTree,
|
||||
renameNode as renameEntry,
|
||||
sortTree,
|
||||
uploadNotes,
|
||||
type FileEntryData
|
||||
uploadNotes
|
||||
} from '@renderer/services/NotesService'
|
||||
import {
|
||||
addUniquePath,
|
||||
@ -712,7 +712,11 @@ const NotesPage: FC = () => {
|
||||
|
||||
let result: Awaited<ReturnType<typeof uploadNotes>>
|
||||
try {
|
||||
result = await uploadNotes(files, targetFolderPath)
|
||||
if (files.length > 0 && 'fullPath' in files[0]) {
|
||||
result = await uploadNotes(files as FileEntryData[], targetFolderPath)
|
||||
} else {
|
||||
result = await uploadNotes(files as File[], targetFolderPath)
|
||||
}
|
||||
} catch (uploadError) {
|
||||
logger.error('Upload operation failed:', uploadError as Error)
|
||||
throw uploadError
|
||||
|
||||
Loading…
Reference in New Issue
Block a user