Skip to content

Commit

Permalink
fix(jaenpagecontext): parse fields string to object
Browse files Browse the repository at this point in the history
  • Loading branch information
schettn authored Sep 15, 2021
1 parent d45c6f9 commit 23036ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/jaen-pages/src/contexts/template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ export const TemplateProvider: React.FC<TemplateProviderProps> = ({
jaenPageContext.id = dynamicPaths[pathName]
}

if ((typeof jaenPageContext.fields as any) === 'string') {
jaenPageContext.fields = JSON.parse(jaenPageContext.fields as any)
}

if (!page || page.deleted) {
return <>{'JaenPages 404'}</>
}
Expand Down

0 comments on commit 23036ac

Please sign in to comment.