Skip to content

Commit

Permalink
Stop using .at() for array access
Browse files Browse the repository at this point in the history
  • Loading branch information
bloodyowl committed Apr 16, 2024
1 parent d5dec54 commit 60017bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cache/write.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const writeOperationToCache = (
);
const fieldArguments = extractArguments(fieldNode, variables);

const parent = data.at(-1) as Record<PropertyKey, unknown>;
const parent = data[data.length - 1] as Record<PropertyKey, unknown>;
const fieldValue = parent[originalFieldName];
const selectedKeys = getSelectedKeys(fieldNode, variables);

Expand Down

0 comments on commit 60017bd

Please sign in to comment.