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

Backslash in the search field causes a syntax error #245

Closed
majapw opened this issue Jun 9, 2016 · 3 comments
Closed

Backslash in the search field causes a syntax error #245

majapw opened this issue Jun 9, 2016 · 3 comments

Comments

@majapw
Copy link

majapw commented Jun 9, 2016

Accidentally hit the backslash in the Filter input on my storybook instance. The entire left panel errored out with the following syntax error:

Invalid regular expression: /\/: \ at end of pattern 
SyntaxError: Invalid regular expression: /\/: \ at end of pattern
    at RegExp (native)
    at eval (eval at 181 (http://localhost:9001/static/manager.bundle.js:595:2), <anonymous>:28:30896)
    at Array.filter (native)
    at Object.n [as storyFilter] (eval at 181 (http://localhost:9001/static/manager.bundle.js:595:2), <anonymous>:28:30848)
    at t.composer (eval at 181 (http://localhost:9001/static/manager.bundle.js:595:2), <anonymous>:28:29763)
    at Array.i (eval at 181 (http://localhost:9001/static/manager.bundle.js:595:2), <anonymous>:1:24197)
    at Object.c [as dispatch] (eval at 181 (http://localhost:9001/static/manager.bundle.js:595:2), <anonymous>:27:26968)
    at setStoryFilter (eval at 181 (http://localhost:9001/static/manager.bundle.js:595:2), <anonymous>:28:11958)
    at onChange (eval at 181 (http://localhost:9001/static/manager.bundle.js:595:2), <anonymous>:28:20845)
    at t.n (eval at 181 (http://localhost:9001/static/manager.bundle.js:595:2), <anonymous>:28:23937)

This can only be fixed with a refresh.

@thani-sh
Copy link
Contributor

Hi @majapw
Just pushed v1.29.5 with a fix. Thanks for reporting.

@majapw
Copy link
Author

majapw commented Jun 10, 2016

Thanks! Much appreciated.

@shilman
Copy link
Member

shilman commented Dec 8, 2022

Shiver me timbers!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-beta.1 containing PR #20152 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

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

No branches or pull requests

3 participants