Skip to content

Commit

Permalink
fix(web): Global alert banner - Handle null case (#16298)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
RunarVestmann and kodiakhq[bot] authored Oct 7, 2024
1 parent 481a8c6 commit 8fbd08d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions apps/web/layouts/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -659,9 +659,7 @@ Layout.getProps = async ({ apolloClient, locale, req }) => {
alertBannerContent: {
...alertBanner,
showAlertBanner:
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error make web strict
alertBanner.showAlertBanner &&
alertBanner?.showAlertBanner &&
(!req?.headers.cookie ||
req.headers.cookie?.indexOf(alertBannerId) === -1),
},
Expand Down

0 comments on commit 8fbd08d

Please sign in to comment.