Skip to content

Fix Unhandled Promise rejection when called with a non-existent path#334

Merged
cpojer merged 1 commit into
facebook:masterfrom
threepointone:patch-1
Sep 6, 2019
Merged

Fix Unhandled Promise rejection when called with a non-existent path#334
cpojer merged 1 commit into
facebook:masterfrom
threepointone:patch-1

Conversation

@threepointone

@threepointone threepointone commented Jul 18, 2019

Copy link
Copy Markdown

When jscodeshift is called with a path that doesn't exist, concatAll() gets called with undefined, which isn't an iterable, and throws an error. This PR fixes the promise being resolved by matching it with the ignore case.

When jscodeshift is called with a path that doesn't exist, `concatAll()` gets called with `undefined`, which isn't an interable, and throws an error. This PR fixes the promise being resolved by matching it with the ignore case.

@snewcomer snewcomer left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Running up against this right now. This seems like a good fix!

@AndersDJohnson

Copy link
Copy Markdown

Yes! I would love for this fix to be merged in and released, and/or the PR I raised (#339) to address the same symptom. Thanks!

@cpojer cpojer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

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.

5 participants