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

Should error if a tab is used outside of a tabs #1067

Open
illicitonion opened this issue Oct 11, 2024 · 0 comments
Open

Should error if a tab is used outside of a tabs #1067

illicitonion opened this issue Oct 11, 2024 · 0 comments

Comments

@illicitonion
Copy link
Member

This <tab> is not inside a <tabs> so it doesn't get displayed:

{{<tab name="Predict and explain 💬 🧠">}}
```js
const profileData = {
firstName: "Francesco",
lastName: "Leoni",
age: 33,
};
console.log(profileData.cityOfResidence);
profileData.cityOfResidence = "Manchester";
console.log(profileData.cityOfResidence);
```
Predict and explain what the console output will be when the code above runs.
{{</tab>}}

We should make this a hard error. It doesn't make sense to create a <tab> which isn't part of a <tabs>.

(I will fix this one case, but we should prevent it in the future / detect other places someone may have accidentally done this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant