mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 10:17:16 +08:00
getTodayJournalEntry: Not all notes have a 'created'
Non Null by default is really needed. I can't wait for these kind of errors to never happen again.
This commit is contained in:
@ -98,6 +98,9 @@ Future<Note> getTodayJournalEntry(NotesFolderFS rootFolder) async {
|
||||
var today = DateTime.now();
|
||||
var matches = await rootFolder.matchNotes((n) async {
|
||||
var dt = n.created;
|
||||
if (dt == null) {
|
||||
return false;
|
||||
}
|
||||
return dt.year == today.year &&
|
||||
dt.month == today.month &&
|
||||
dt.day == today.day;
|
||||
|
Reference in New Issue
Block a user