Skip to content

Fix type error in Redux Essentials. #3813

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

Merged
merged 1 commit into from
Jul 14, 2020
Merged

Fix type error in Redux Essentials. #3813

merged 1 commit into from
Jul 14, 2020

Conversation

samwightt
Copy link
Contributor

@samwightt samwightt commented Jul 14, 2020


name: "Fix error in Redux Essentials tutorial"
about: Fixes a type error in the Redux Essentials tutorial

PR Type: Documentation Fix

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

This PR fixes a bug in the Redux Essentials Tutorial, fixing issue #3812.

Why should this PR be included?

New users who go through the Redux Essentials tutorial will have code that might not work as expected if this fix is not added.

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?

What docs changes are needed to explain this?

See above.

Bug Fixes

What is the current behavior, and the steps to reproduce the issue?

When the user visits the route /posts/1 or /posts/2, the not found screen appears.

What is the expected behavior?

The post for id 1 or id 2 should display.

How does this PR fix the problem?

This PR adds a .toString() call in a comparison function to fix a type error where the selector was comparing an integer and a string (which will always return false).

@netlify
Copy link

netlify bot commented Jul 14, 2020

Deploy preview for redux-docs ready!

Built with commit 25af186

https://deploy-preview-3813--redux-docs.netlify.app

@timdorr
Copy link
Member

timdorr commented Jul 14, 2020

Thanks!

@timdorr timdorr merged commit f77a95a into reduxjs:master Jul 14, 2020
alokreddy pushed a commit to alokreddy/redux that referenced this pull request Sep 30, 2020
webMasterMrBin pushed a commit to webMasterMrBin/redux that referenced this pull request Aug 21, 2021
webMasterMrBin pushed a commit to webMasterMrBin/redux that referenced this pull request Aug 21, 2021
webMasterMrBin pushed a commit to webMasterMrBin/redux that referenced this pull request Aug 21, 2021
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