mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-27 10:47:41 +00:00
change(common/lmlayer): replace last index instead of pop/push
This commit is contained in:
parent
43c517ecc7
commit
fb015fcf7a
1 changed files with 4 additions and 2 deletions
|
|
@ -63,9 +63,11 @@ namespace wordBreakers {
|
|||
}
|
||||
|
||||
function concatLastSpanInStackWith(span: Span) {
|
||||
let top = stack.pop();
|
||||
let lastIndex = stack.length - 1;
|
||||
|
||||
let top = stack[lastIndex];
|
||||
let joinedSpan = concatenateSpans(top, span);
|
||||
stack.push(joinedSpan);
|
||||
stack[lastIndex] = joinedSpan;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue