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

chore: Fix bug in CodeSnippets component #988

Merged

Conversation

aoki-atsushi
Copy link
Contributor

@aoki-atsushi aoki-atsushi commented Oct 7, 2024

Description

The CodeSnippets component had a bug where the condition for checking the selectedVariant was incorrect. This commit fixes the bug by adding a null check for the language variant.

Motivation and Context

An error occurs in the CodeSnippets component when languageTabs is empty in docusaurus.config.ts.
Previously, CodeSnippets was not rendered.

languageTabs: [],

How Has This Been Tested?

I set languageTabs to empty and confirmed that it was rendering the same as before without any errors in local.

Screenshots (if appropriate)

Before revision

image

After revision

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes if appropriate.
  • All new and existing tests passed.

The CodeSnippets component had a bug where the condition for checking the selectedVariant was incorrect. This commit fixes the bug by adding a null check for the language variant.
@aoki-atsushi aoki-atsushi marked this pull request as ready for review October 7, 2024 06:17
Copy link

github-actions bot commented Oct 7, 2024

Visit the preview URL for this PR (updated for commit 7dfa13b):

https://docusaurus-openapi-36b86--pr988-9b910rnr.web.app

(expires Wed, 06 Nov 2024 13:50:04 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: bf293780ee827f578864d92193b8c2866acd459f

@sserrata sserrata merged commit 03f3848 into PaloAltoNetworks:main Oct 7, 2024
15 checks passed
@aoki-atsushi aoki-atsushi deleted the fix-empty-languageTabs-bug branch October 8, 2024 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants