Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Fix reducer bug in case of use optional thunk id. #36

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

VitaliiSubochev
Copy link

In case of use optional thunk identifier, reducer not update properly state i.e. request action not pass to any state from pending state.

In case of use optional thunk identifier, reducer not update properly state i.e. request action not pass to any state from pending state.
@codecov-io
Copy link

codecov-io commented Mar 9, 2019

Codecov Report

Merging #36 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #36   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           5      5           
  Lines         134    135    +1     
  Branches       46     46           
=====================================
+ Hits          134    135    +1
Impacted Files Coverage Δ
src/reducer.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 329befe...06cc9a1. Read the comment docs.

@diegohaz
Copy link
Owner

diegohaz commented Mar 9, 2019

Hi @vitalystr. Thank you for the PR. Could you please write a test that illustrates your use case?

@VitaliiSubochev
Copy link
Author

VitaliiSubochev commented Mar 9, 2019

As I understand it a problem in compiled code in /dist folder on /src it works great. Chunk of code
if (!value) { newValue = { ...substate[name] } delete newValue[id] } else { newValue = { ...substate[name], [id]: true } }
compile into
if (!value) { newValue = _extends({}, substate[name]); delete newValue[id]; } else { newValue = _extends({}, substate[name], _defineProperty({}, id, true)); }

and its not work in my app.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants