Skip to content

Commit

Permalink
enable importing file to empty folder
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yosmoc committed Nov 4, 2017
1 parent 993cb9c commit 602b15e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions browser/main/NoteList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 602b15e

Please sign in to comment.