Skip to content

Commit d5f9f98

Browse files
committed
fix: Move from key in error (wrong) to error.code
1 parent 81e4316 commit d5f9f98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/schema/associations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ export async function buildAssociations(
143143
// @ts-expect-error
144144
associations[key] = await load(file, { maxRows: context.dataset.options?.maxRows }).catch(
145145
(error: any) => {
146-
if (key in error) {
147-
context.dataset.issues.add({ code: error.key, location: file.path })
146+
if (error.code) {
147+
context.dataset.issues.add({ ...error, location: file.path })
148148
}
149149
},
150150
)

0 commit comments

Comments
 (0)