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

API Fetch: Avoid unnecessary options shallow clone on unhandled method #11332

Merged
merged 2 commits into from
Nov 2, 2018

Conversation

aduth
Copy link
Member

@aduth aduth commented Oct 31, 2018

See #7018 (comment)

This pull request seeks to refactor the @wordpress/api-fetch HTTP v1 middleware to avoid an unnecessary shallow clone of options unless intended to be enhanced by the middleware.

Testing instructions:

Ensure unit test pass:

npm run test-unit

@aduth aduth added [Type] Code Quality Issues or PRs that relate to code quality [Package] API fetch /packages/api-fetch labels Oct 31, 2018
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Thanks for the optimisation

@aduth aduth merged commit d40b926 into master Nov 2, 2018
@aduth aduth added this to the 4.3 milestone Nov 2, 2018
@aduth aduth deleted the update/api-fetch-middlewares-clone branch November 2, 2018 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] API fetch /packages/api-fetch [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants