mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-29 09:17:45 +00:00
fix(web): stop unnecessarily cloning reused ContextState
This commit is contained in:
parent
bbf673cce2
commit
1dbe62e42e
1 changed files with 1 additions and 1 deletions
|
|
@ -137,7 +137,7 @@ export class ContextTracker extends CircularArray<ContextState> {
|
|||
// If we have a perfect match with a pre-existing context, no mutations have
|
||||
// happened; just re-use the old context state.
|
||||
if(tailEditLength == 0 && leadTokenShift == 0 && tailTokenShift == 0) {
|
||||
baseTransition.replaceFinal(new ContextState(matchState), transformDistribution);
|
||||
baseTransition.replaceFinal(matchState, transformDistribution);
|
||||
return baseTransition;
|
||||
} else {
|
||||
// If we didn't get any input, we really should perfectly match
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue