Skip to content

Commit

Permalink
Fix note creation in All Notes
Browse files Browse the repository at this point in the history
  • Loading branch information
asmsuechan committed Aug 15, 2017
1 parent f2a03e4 commit b85790d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions browser/main/NewNoteButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ class NewNoteButton extends React.Component {
}

if (storage == null) this.showMessageBox('No storage to create a note')
let folder = storage.folders[0]
folder = _.find(storage.folders, {key: params.folderKey})
const folder = _.find(storage.folders, {key: params.folderKey}) || storage.folders[0]
if (folder == null) this.showMessageBox('No folder to create a note')

return {
Expand Down

0 comments on commit b85790d

Please sign in to comment.