Skip to content

Commit

Permalink
Undo usage of Array#at
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimdemedes committed Jul 16, 2023
1 parent a828b6b commit e2c2c64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ export default class App extends PureComponent<Props, State> {

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 {
Expand Down
2 changes: 1 addition & 1 deletion src/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit e2c2c64

Please sign in to comment.