Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix note creation in All Notes
  • Loading branch information
asmsuechan committed Aug 15, 2017
commit b85790d2fab4f3d1156a74c4e14f640924d9f307
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