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

fix: BaseError@walk to return null when predicate fn not matches #874

Merged
merged 2 commits into from
Jul 11, 2023

Conversation

Alexsey
Copy link
Contributor

@Alexsey Alexsey commented Jul 10, 2023

As discussed here, the current implementation of BaseError@walk(fn?) has a bug when fn is provided and no error matches it

Current behavior: the deepest error will be returned
Expected behavior: null should be returned


PR-Codex overview

Focus of the PR:

Fixing the BaseError.walk function to return null if the predicate callback is not satisfied.

Detailed summary:

  • Fixed BaseError.walk to return null if the predicate callback is not satisfied.
  • Updated the implementation of walk in src/errors/base.ts.
  • Added a new test case for walk in src/errors/base.test.ts.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@changeset-bot
Copy link

changeset-bot bot commented Jul 10, 2023

🦋 Changeset detected

Latest commit: 801d638

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jul 10, 2023

@Alexsey is attempting to deploy a commit to the wagmi Team on Vercel.

A member of the Team first needs to authorize it.

@jxom jxom merged commit a9bc9f6 into wevm:main Jul 11, 2023
@github-actions github-actions bot mentioned this pull request Jul 11, 2023
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.

2 participants