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:
parent
665dff94fe
commit
dcc9400483
1 changed files with 4 additions and 1 deletions
|
@ -56,7 +56,10 @@ fn handle_pairing_request(root: Value, tx: SyncSender<DBHandlerRequest>) -> Resu
|
||||||
phrase_str = phrase_str.split_at(idx).0;
|
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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue