Notes not loading even after linking back using dropbox

After adding the 'Unnamed' folder from dropbox

Should list all my previous notes
Not sure if connected, but the last thing I did was to load my notes via mobile (same dropbox folder). Then everything stopped working.
The trace:
Uncaught (in promise) TypeError: Cannot read property 'forEach' of undefined
at file:///Applications/Boostnote.app/Contents/Resources/app/compiled/main.js:3595:19
at Array.some (native)
at data (file:///Applications/Boostnote.app/Contents/Resources/app/compiled/main.js:3567:21)
at file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/redux/dist/redux.min.js:1:5926
at s (file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/redux/dist/redux.min.js:1:1820)
at file:///Applications/Boostnote.app/Contents/Resources/app/compiled/main.js:55444:10
at <anonymous>:null:null
Upon further investigation, it seems to error on this bit:
note.tags.forEach(function (tag) {
var tagNoteList = state.tagNoteMap.get(tag);
if (tagNoteList == null) {
tagNoteList = new _Mutable.Set(tagNoteList);
state.tagNoteMap.set(tag, tagNoteList);
}
tagNoteList.add(uniqueKey);
});
so tags is undefined for one of the notes?
More edits:
So I did a grep on all the notes in the folder and all tags have a value of [] (because I don't use them).
I should have searched for notes WITHOUT tags in them and I found some:
Apps/boostnote-mobile $ grep -L "tags" notes/**/*.cson
notes/87909490a31bb6aa869f.cson
Apps/boostnote-mobile $ cat notes/87909490a31bb6aa869f.cson
'content': ''
Deleted that file and my notes loaded properly!
I guess we can have a guard clause for when the tags is not included in the notes? I would assume that this happened somehow from my mobile app or something. Not sure how to replicate a note with no tags and just blank content, but maybe just a guard clause like
if (note == undefined || note.tags == undefined) // pseudocode {
return
}
note.tags.forEach ....
just a suggestion. I don't have much knowledge with Electron to make a PR for this.
Thank you @corroded!
The current version of Boostnote seems to work with Dropbox.
Please feel free to reopen this issue if you are still experiencing it.
Most helpful comment
The trace:
Upon further investigation, it seems to error on this bit:
so tags is undefined for one of the notes?
More edits:
So I did a
grepon all the notes in the folder and all tags have a value of[](because I don't use them).I should have searched for notes WITHOUT
tagsin them and I found some:Deleted that file and my notes loaded properly!