back-end: Minor fix related to phrase handling

Fixes passing an empty string to the db in (probably) rare cases.
This commit is contained in:
Stephen Seo 2022-04-27 14:15:54 +09:00
parent 665dff94fe
commit dcc9400483

View file

@ -56,7 +56,10 @@ fn handle_pairing_request(root: Value, tx: SyncSender<DBHandlerRequest>) -> Resu
phrase_str = phrase_str.split_at(idx).0;
}
}
phrase = Some(phrase_str.to_owned());
if !phrase_str.is_empty() {
phrase = Some(phrase_str.to_owned());
}
}
}
}