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: miniKindOf returns 'object' for plain object #4160

Merged
merged 3 commits into from Sep 14, 2021
Merged

fix: miniKindOf returns 'object' for plain object #4160

merged 3 commits into from Sep 14, 2021

Conversation

iolh
Copy link
Contributor

@iolh iolh commented Sep 1, 2021

name: "miniKindOf returns 'object' for plain object"

about: miniKindOf returns 'object' for plain object

PR Type


Does this PR add a new feature, or fix a bug?

Fix a bug.

Why should this PR be included?

Reference link:https://github.com/jonschlinkert/kind-of/blob/abab085d65f7ee978011da8f135291892fcd97db/index.js#L54
When I read the redux source code, its incorrect behavior confused me.

Checklist

Have you added an explanation of what your changes do and why you'd like us to include them?
Is there an existing issue for this PR?
Have the files been linted and formatted?
Have the docs been updated to match the changes in the PR?
Have the tests been updated to match the changes in the PR?
Have you run the tests locally to confirm they pass?

Bug Fixes

What is the current behavior, and the steps to reproduce the issue?
For a plain object,miniKindOf should returns ""

What is the expected behavior?
For a plain object,miniKindOf should returns "object" instead of ""

How does this PR fix the problem?
use Object.prototype.toString.call() to get the correct type of plain object instead of typeof

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 1, 2021

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 aa48de7:

Sandbox Source
Vanilla Configuration
Vanilla Typescript Configuration

@netlify
Copy link

netlify bot commented Sep 1, 2021

✔️ Deploy Preview for redux-docs ready!

🔨 Explore the source changes: aa48de7

🔍 Inspect the deploy log: https://app.netlify.com/sites/redux-docs/deploys/6140b57f59ac13000830edf4

😎 Browse the preview: https://deploy-preview-4160--redux-docs.netlify.app

@timdorr
Copy link
Member

timdorr commented Sep 14, 2021

OK, you and #4173 have the exact same PR. I'm going to merge this one since it's first. Thanks!

@timdorr timdorr merged commit 6d47bb9 into reduxjs:master Sep 14, 2021
@markerikson
Copy link
Contributor

Note that we need this fix applied to the 4.x branch as well.

timdorr added a commit that referenced this pull request Sep 14, 2021
@iolh
Copy link
Contributor Author

iolh commented Sep 14, 2021

thanks !

@markerikson
Copy link
Contributor

@timdorr Did this actually make make it into our 4.x branch? I don't think it did.

@timdorr
Copy link
Member

timdorr commented Oct 30, 2021

I thought there was a PR for that branch? I guess it didn't.

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.

None yet

3 participants