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

[Bug]: Doesn't // Match any prop that ends with "date" or "Date". #24120

Closed
manavm1990 opened this issue Sep 11, 2023 · 7 comments
Closed

[Bug]: Doesn't // Match any prop that ends with "date" or "Date". #24120

manavm1990 opened this issue Sep 11, 2023 · 7 comments

Comments

@manavm1990
Copy link

Describe the bug

In preview.ts, you have: date: /Date$/,. 🙅🏾‍♀️ It's missing an i at the end. so it's only getting Date, and not date.

Just replace the code here with: /Date$/i. That is all. ✔️

To Reproduce

No response

System

No response

Additional context

No response

@vanessayuenn
Copy link
Contributor

@manavm1990 thanks for opening this and digging into the source already. Since you already did the investigation, would you also like to open a PR with a fix? We'd really appreciate that!

@arup1221
Copy link
Contributor

@manavm1990 have you completed this and made PR?

@manavm1990
Copy link
Author

Sorry. I have not. I m on vacation until Monday. Feel free to do it, or else I will check it then @arup1221

@arup1221
Copy link
Contributor

@manavm1990 Sir can I make a pr on this?

@manavm1990
Copy link
Author

Yes. Please!

amarnathgupta added a commit to amarnathgupta/storybook that referenced this issue Sep 17, 2023
…24120

Description:
- Resolved the bug reported in issue storybookjs#24120, where the regular expression `/Date$/` wasn't matching properties that end with "date" or "Date" due to case sensitivity.
- Changed the regular expression to `/Date$/i` in the configuration file to make it case-insensitive, allowing it to match both "Date" and "date."

Issue: storybookjs#24120
@manavm1990
Copy link
Author

Nice @arup1221

@vanessayuenn
Copy link
Contributor

closed via #24195. Thanks @arup1221!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants