Note: Do not try to generate the summary if not loaded

This commit is contained in:
Vishesh Handa
2020-03-01 14:27:58 +01:00
parent b5f7a24b1f
commit c90189e55b

View File

@ -120,6 +120,8 @@ class Note with ChangeNotifier implements Comparable<Note> {
}
String get summary {
if (_loadState != NoteLoadState.Loaded) return "";
_summary ??= stripMarkdownFormatting(body);
return _summary;
}