Skip to content

Commit

Permalink
feat: improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
airjp73 committed Jun 13, 2024
1 parent 7825cd6 commit 3e33be1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ export const moveFieldArrayKeys = (
const parts = stringToPathArray(suffix);
const index = Number(parts.shift());
if (Number.isNaN(index))
throw new Error("Attempted to update a non-array field");
throw new Error(`Attempted to update a non-array field, ${fieldName}`);
const newIndex = updater(index);
return pathArrayToString([fieldName, newIndex, ...parts]);
});
Expand Down

0 comments on commit 3e33be1

Please sign in to comment.