Fix panic when using multi-level key mapping
This commit is contained in:
parent
5501669f8c
commit
fbba47fbc0
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ impl KeyTrieNode {
|
|||
}
|
||||
}
|
||||
body.sort_unstable_by_key(|(_, keys)| {
|
||||
self.order.iter().position(|&k| k == keys[0]).unwrap()
|
||||
self.order.iter().position(|&k| k == keys[0]).unwrap_or(0)
|
||||
});
|
||||
let prefix = format!("{} ", self.name());
|
||||
if body.iter().all(|(desc, _)| desc.starts_with(&prefix)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue