Skip to content

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

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
merged 1 commit into from
May 12, 2025

Conversation

harish-sethuraman
Copy link
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

Copy link

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
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
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