Skip to content

Commit

Permalink
fix(docs-template): type guard for boolean
Browse files Browse the repository at this point in the history
isPageIncomplete variable is truthy or falsy but the banner notification
component accept a boolean props. So we convert truthy or falsy to true
or false

Refs: ethereum#6392
  • Loading branch information
Mousticke committed Jun 3, 2022
1 parent f3efc79 commit deb6d54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/templates/docs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const DocsPage = ({
const isRightToLeft = isLangRightToLeft(mdx.frontmatter.lang as Lang)

const tocItems = mdx.tableOfContents?.items
const isPageIncomplete = mdx.frontmatter.incomplete
const isPageIncomplete = !!mdx.frontmatter.incomplete

const { editContentUrl } = siteData.siteMetadata || {}
const { relativePath, slug } = pageContext
Expand Down

0 comments on commit deb6d54

Please sign in to comment.