Skip to content

Check if regex and regex.test is available before calling it#608

Merged
arunoda merged 3 commits intostorybookjs:masterfrom
kitze:master
Nov 9, 2016
Merged

Check if regex and regex.test is available before calling it#608
arunoda merged 3 commits intostorybookjs:masterfrom
kitze:master

Conversation

@kitze
Copy link
Copy Markdown
Contributor

@kitze kitze commented Nov 8, 2016

Trying to fix #607

@arunoda
Copy link
Copy Markdown
Member

arunoda commented Nov 8, 2016

We need to do this.
But I wanna know about the real cause of the #607 .
Could you reply to my comment on #607?

@kitze
Copy link
Copy Markdown
Contributor Author

kitze commented Nov 8, 2016

@arunoda just replied.

Copy link
Copy Markdown
Member

@arunoda arunoda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After that, we are good to go.

Comment thread src/server/config.js Outdated
const jsonLoaderExists = config.module.loaders.reduce(
(value, loader) => {
return value || [].concat(loader.test).some(regex => regex && regex.test && regex.test('my_package.json'));
return value || [].concat(loader.test).some((loader) => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rename this loader name into something like matcher.
Like this:

return value || [].concat(loader.test).some((matcher) => { ...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arunoda done!

@arunoda
Copy link
Copy Markdown
Member

arunoda commented Nov 9, 2016

Awesome.

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Jul 1, 2025

View your CI Pipeline Execution ↗ for commit a86a5f3.

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 1m 16s View ↗

☁️ Nx Cloud last updated this comment at 2025-07-01 23:51:21 UTC

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

Successfully merging this pull request may close these issues.

3 participants