Skip to content

Commit

Permalink
Merge pull request #1653 from SUI-Components/fix/NOJIRA-safe-check-wh…
Browse files Browse the repository at this point in the history
…en-no-cookies

fix(packages/sui-ssr): safe check of type
  • Loading branch information
paulusrex authored Oct 25, 2023
2 parents 4951407 + 84175aa commit 664f050
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/sui-ssr/server/initialContextValue/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const INITIAL_CONTEXT_VALUE = '__INITIAL_CONTEXT_VALUE__'
export const getInitialContextValue = context =>
Object.keys(context)
.filter(
contextKey => typeof context[contextKey].getInitialData === 'function'
contextKey => typeof context[contextKey]?.getInitialData === 'function'
)
.reduce((acc, contextKey) => {
acc[contextKey] = context[contextKey].getInitialData()
Expand Down

0 comments on commit 664f050

Please sign in to comment.