Skip to content

fix: handle undefined and null as stats value#302

Merged
alexander-akait merged 2 commits into
webpack:masterfrom
alan-agius4:fix_stats
Oct 31, 2018
Merged

fix: handle undefined and null as stats value#302
alexander-akait merged 2 commits into
webpack:masterfrom
alan-agius4:fix_stats

Conversation

@alan-agius4
Copy link
Copy Markdown
Contributor

In certain cases depending on the inputFileSystem stats doesn't throw, but returns a falsey value such as undefined and null. In this case an error from globby will be thrown Patterns must be a string or an array of strings

Relates to: angular/angular-cli#12686

Copy link
Copy Markdown
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Need tests

@alan-agius4
Copy link
Copy Markdown
Contributor Author

@evilebottnawi, done

Copy link
Copy Markdown
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Good work. Thanks for helping. Let's wait CI green.

@alan-agius4
Copy link
Copy Markdown
Contributor Author

Oh, you need to support Node 4. Il'll update the code.

In certain cases depending on the inputFileSystem `stats` doesn't throw, but returns a falsey value such as `undefined` and `null`. In this case an error from globby will be thrown `Patterns must be a string or an array of strings`
@alexander-akait
Copy link
Copy Markdown
Member

/cc @alan-agius4 Is everything finished and does this solve the problem?

@alan-agius4
Copy link
Copy Markdown
Contributor Author

Yes it does

@alexander-akait alexander-akait merged commit 78c5d12 into webpack:master Oct 31, 2018
@alan-agius4 alan-agius4 deleted the fix_stats branch November 8, 2018 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants