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

bugfix: Avoid crash when there are no matching files #300

Closed
wants to merge 1 commit into from

Conversation

JHilker
Copy link
Contributor

@JHilker JHilker commented Jan 10, 2019

Currently in the case of no files, the first promise of the runner returns undefined, however this leads to a Cannot read property 'Symbol(Symbol.iterator)' of undefined when you pass that undefined value into Promise.all(pendingWorkers).

The simple fix here is to return an empty array instead here so that Promise.all([]) doesn't crash.

Node version: v8.9.1

Before:
image

After:
image

Currently in the case of no files, the first promise of the runner returns undefined, however this leads to a `Cannot read property 'Symbol(Symbol.iterator)' of undefined` when you pass that undefined value into `Promise.all(pendingWorkers)`.

The simple fix here is to return an empty array instead here so that `Promise.all([])` doesn't crash.

Node version: v8.9.1
@fkling
Copy link
Contributor

fkling commented Jan 16, 2019

#295 already provided that fix, I just didn't get around to merging it. Thanks though!

@fkling fkling closed this Jan 16, 2019
@JHilker JHilker deleted the patch-1 branch January 16, 2019 20:26
@JHilker
Copy link
Contributor Author

JHilker commented Jan 16, 2019

Ahh! Missed that PR. Thanks for merging it!

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.

None yet

3 participants