1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +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:
yosmoc
2017-11-04 22:32:30 +01:00
parent 1f8acc3afc
commit 21220f93b1

View File

@@ -434,10 +434,8 @@ class NoteList extends React.Component {
addNotesFromFiles (filepaths) { addNotesFromFiles (filepaths) {
const { dispatch, location } = this.props const { dispatch, location } = this.props
const targetIndex = this.getTargetIndex() const storageKey = this.props.params.storageKey
const folderKey = this.props.params.folderKey
const storageKey = this.notes[targetIndex].storage
const folderKey = this.notes[targetIndex].folder
if (filepaths === undefined) return if (filepaths === undefined) return
filepaths.forEach((filepath) => { filepaths.forEach((filepath) => {