Skip to content

Commit

Permalink
Try to fix it instead
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Feb 23, 2023
1 parent 7516e92 commit daeb65f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function getField<TFieldType = any>(
moduleExportList: ModuleExports[],
field: string
): TFieldType | TFieldType[] {
return moduleExportList.map((xs) => xs[field]).filter(Boolean);
return moduleExportList.map((xs) => xs.default?.[field] ?? xs[field]).filter(Boolean);
}

export function getArrayField<TFieldType = any>(
Expand Down

0 comments on commit daeb65f

Please sign in to comment.