Skip to content

Commit

Permalink
fix(format-entity): allow no nodeTransform option (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
thompsonsj authored Dec 5, 2023
1 parent 76f693e commit 7751b53
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugin/src/format-entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export const formatEntity = ({ data, locale, gatsbyNodeType, payloadImageSize }:
...(locale && { locale: locale }),
payloadImageSize,
}
if (!context.pluginOptions.nodeTransform) {
return res
}
const transformedRes: { [key: string]: any } = {}
Object.keys(res).forEach((value) => {
if (isFunction(context.pluginOptions.nodeTransform[value])) {
Expand Down

0 comments on commit 7751b53

Please sign in to comment.