Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: Fix bug in CodeSnippets component #988

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

Merged

Conversation

@aoki-atsushi
Copy link
Contributor

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

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.
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 2024年11月06日 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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /