summaryrefslogtreecommitdiffstats
path: root/ui/src/components
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2019-12-20 00:39:04 +0200
committerManos Pitsidianakis <el13635@mail.ntua.gr>2019-12-20 00:39:04 +0200
commit8de5a9412dfad6c9cdffc1c20039da0fd0e7a37c (patch)
tree390f13b30b01e5ec737cfdaaf43e73684b3e132a /ui/src/components
parent0739f80f4ba2b61eb0ce508446d0b68dcb6b869b (diff)
ui/compose: small panic fix
if user (Esc)apes from the send dialog the selector widget will not return any values
Diffstat (limited to 'ui/src/components')
-rw-r--r--ui/src/components/mail/compose.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/src/components/mail/compose.rs b/ui/src/components/mail/compose.rs
index 8f2838de..e1a492ca 100644
--- a/ui/src/components/mail/compose.rs
+++ b/ui/src/components/mail/compose.rs
@@ -566,7 +566,7 @@ impl Component for Composer {
ViewMode::Send(s) => s,
_ => unreachable!(),
};
- let result: bool = s.collect()[0];
+ let result: bool = s.collect().get(0).map(|b| *b).unwrap_or(false);
if result {
self.update_draft();
if send_draft(