Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

guard function broken in theme folder #467

Closed
guitaoliu opened this issue Feb 28, 2023 · 0 comments
Closed

guard function broken in theme folder #467

guitaoliu opened this issue Feb 28, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@guitaoliu
Copy link
Contributor

guitaoliu commented Feb 28, 2023

Describe the bug

The guard function is broken by PR #436. Some checks expect the guard function to stop rendering if the first parameter value is false. After the change, as long as the value is not undefined, the component is always rendered. At least all required indication renderings are broken.

https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/blob/main/packages/docusaurus-theme-openapi-docs/src/markdown/utils.ts#L27

Expected behavior

guard(false, () => <Test />) should stop rendering the Test component.

Screenshots

image

@guitaoliu guitaoliu added the bug Something isn't working label Feb 28, 2023
@sserrata sserrata closed this as completed Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants