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

fix: add declaration checks to avoid destructuring undefined #99

Merged
merged 3 commits into from Nov 1, 2022

Conversation

stefanprobst
Copy link
Contributor

@stefanprobst stefanprobst commented Jul 12, 2022

Issue: #106

What Changed

i was getting crashes in vs code without this check.

if you want you could also enable the typescript noUncheckedIndexedAccess option to more easily catch similar issues.

Checklist

Check the ones applicable to your change:

  • Ran yarn update-all
  • Tests are updated
  • Documentation is updated

Change Type

Indicate the type of change your pull request is:

  • maintenance
  • documentation
  • patch
  • minor
  • major

@yannbf
Copy link
Member

yannbf commented Aug 2, 2022

Hey @stefanprobst thanks a lot for this PR! I wonder what exact code is failing for you? Can you somehow share it?
And definitely we can add the tsconfig rule, in fact I'm sure there are more places that might need the fix.

@yannbf yannbf added the patch Increment the patch version when merged label Nov 1, 2022
@yannbf
Copy link
Member

yannbf commented Nov 1, 2022

Hey @stefanprobst I followed your recommendation and fixed the occurrences of the issues. Thank you so much!

@yannbf yannbf changed the title fix: check declaration fix: add declaration checks to avoid destructuring undefined Nov 1, 2022
@yannbf yannbf merged commit b6c08ae into storybookjs:main Nov 1, 2022
3 checks passed
@github-actions
Copy link

github-actions bot commented Nov 1, 2022

🚀 PR was released in v0.6.7 🚀

@github-actions github-actions bot added the released This issue/pull request has been released. label Nov 1, 2022
@stefanprobst stefanprobst deleted the fix/check-declaration-exists branch November 1, 2022 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants