diff --git a/src/components/App.tsx b/src/components/App.tsx index 0a9cdb2d9..ecd9e5936 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -247,7 +247,9 @@ export default class App extends PureComponent { focusPrevious = (): void => { this.setState(previousState => { - const lastFocusableId = previousState.focusables.at(-1)?.id; + const lastFocusableId = + previousState.focusables[previousState.focusables.length - 1]?.id; + const previousFocusableId = this.findPreviousFocusable(previousState); return { diff --git a/src/output.ts b/src/output.ts index 14279aaca..60df9811c 100644 --- a/src/output.ts +++ b/src/output.ts @@ -114,7 +114,7 @@ export default class Output { let {x, y} = operation; let lines = text.split('\n'); - const clip = clips.at(-1); + const clip = clips[clips.length - 1]; if (clip) { const clipHorizontally =