mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
enable importing file to empty folder
Current implementation is fetching the import destination storageKey and folderkey from a file in the folder. If no files are in the folder, it cannot fetch these keys. Use prop.params.storageKey / folderKey instead.
This commit is contained in:
@@ -434,10 +434,8 @@ class NoteList extends React.Component {
|
||||
addNotesFromFiles (filepaths) {
|
||||
const { dispatch, location } = this.props
|
||||
|
||||
const targetIndex = this.getTargetIndex()
|
||||
|
||||
const storageKey = this.notes[targetIndex].storage
|
||||
const folderKey = this.notes[targetIndex].folder
|
||||
const storageKey = this.props.params.storageKey
|
||||
const folderKey = this.props.params.folderKey
|
||||
|
||||
if (filepaths === undefined) return
|
||||
filepaths.forEach((filepath) => {
|
||||
|
||||
Reference in New Issue
Block a user