mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 02:07:39 +08:00
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:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user