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

Optimized the isPlainObject.ts #4583

Closed
wants to merge 3 commits into from
Closed

Optimized the isPlainObject.ts #4583

wants to merge 3 commits into from

Conversation

connect-bilal
Copy link

In this version, unnecessary iteration through the prototype chain has been eliminated by directly comparing the object's prototype with the base Object.prototype. The code is more concise, easier to read, and performs the same functionality

Thanks for the PR!

To better assist you, please select the type of PR you want to create.

Click the "Preview" tab above, and click on the link for the PR type:

In this version, unnecessary iteration through the prototype chain has been eliminated by directly comparing the object's prototype with the base Object.prototype. The code is more concise, easier to read, and performs the same functionality
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 25, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 004e006:

Sandbox Source
Vanilla Configuration
Vanilla Typescript Configuration

@EskiMojo14
Copy link
Contributor

EskiMojo14 commented Jul 25, 2023

Thanks for the PR! Unfortunately as you can see, the tests have failed meaning this change introduces a regression.

If you can ensure the same functionality is possible with your change, then we can consider it :)

@EskiMojo14
Copy link
Contributor

Hey there - after a little more research, this isn't something we're going to change.

Previous PRs regarding this:
#4510
#4486
#3987
#3786
#3366
#3257
#3120
reduxjs/redux-toolkit#581

Original PR implementing it, for background: #2599

@EskiMojo14 EskiMojo14 closed this Jul 25, 2023
@connect-bilal connect-bilal deleted the patch-1 branch July 25, 2023 12:03
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