JournalEditor: Avoid crashing if note has no creation date

In the future when we improve the git itegration that will never happen,
but for now, it's what we have.
This commit is contained in:
Vishesh Handa
2020-03-02 19:56:13 +01:00
parent 3640176f8d
commit 0fc40da55b

View File

@ -9,6 +9,9 @@ class JournalEditorHeader extends StatelessWidget {
@override
Widget build(BuildContext context) {
if (note.created == null) {
return Container();
}
var dateStr = DateFormat('MMMM, yyyy').format(note.created);
var timeStr = DateFormat('EEEE HH:mm').format(note.created);