Skip to content

Commit

Permalink
Merge pull request #803 from asmsuechan/fix-note-creation-in-all-notes
Browse files Browse the repository at this point in the history
Fix note creation in All Notes
  • Loading branch information
asmsuechan authored Aug 15, 2017
2 parents f2a03e4 + b85790d commit ce5e1ba
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 ce5e1ba

Please sign in to comment.