Skip to content

Commit

Permalink
fix(echo_translator): return null for empty query
Browse files Browse the repository at this point in the history
  • Loading branch information
lotem committed Mar 9, 2024
1 parent 38cead8 commit ec4bdfe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rime/gear/echo_translator.cc
Expand Up @@ -31,6 +31,9 @@ an<Translation> EchoTranslator::Query(const string& input,
const Segment& segment) {
DLOG(INFO) << "input = '" << input << "', [" << segment.start << ", "
<< segment.end << ")";
if (input.empty()) {
return nullptr;
}
auto candidate =
New<SimpleCandidate>("raw", segment.start, segment.end, input);
if (candidate) {
Expand Down

0 comments on commit ec4bdfe

Please sign in to comment.