Skip to content

fix: set default code when new language is selected#97

Merged
nzakas merged 1 commit into
mainfrom
fix/new-language-breakage
May 12, 2025
Merged

fix: set default code when new language is selected#97
nzakas merged 1 commit into
mainfrom
fix/new-language-breakage

Conversation

@harish-sethuraman
Copy link
Copy Markdown
Member

Prerequisites checklist

What is the purpose of this pull request?

What changes did you make? (Give an overview)

Related Issues

Is there anything you'd like reviewers to focus on?

  • test if the changes are working fine

@netlify
Copy link
Copy Markdown

netlify Bot commented May 10, 2025

Deploy Preview for eslint-code-explorer ready!

Name Link
🔨 Latest commit 63ee9f4
🔍 Latest deploy log https://app.netlify.com/sites/eslint-code-explorer/deploys/681ed249e810bd0008b82fea
😎 Deploy Preview https://deploy-preview-97--eslint-code-explorer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@eslint-github-bot eslint-github-bot Bot added the bug Something isn't working label May 10, 2025
@harish-sethuraman harish-sethuraman self-assigned this May 10, 2025
Copy link
Copy Markdown
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@nzakas nzakas merged commit e3e9906 into main May 12, 2025
8 checks passed
@nzakas nzakas deleted the fix/new-language-breakage branch May 12, 2025 14:46
Comment on lines +212 to +218
if (explorer.code[language] === undefined) {
explorer.setCode({
...explorer.code,
[language]: defaultCode[language],
});
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to handle this scenario in the use-explorer.ts file I guess.

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

Successfully merging this pull request may close these issues.

Bug: New languages don't work

3 participants