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 #6 - do not mutate vuex store outside mutation handlers #64

Conversation

abernh
Copy link
Contributor

@abernh abernh commented Oct 18, 2021

a simple deep clone of the old state prevents setting off 'Error: do not mutate vuex store state outside mutation handlers' when merging the preset statesPaths.

A test was added as well, which, if the new deep clone is removed, fails nicely with the mentioned error message.

Related #6

a simple deep clone of the old state prevents setting off
'Error: do not mutate vuex store state outside mutation handlers'
when merging the preset statesPaths
de-activating the previous fixes in commit f028348 will let this new
test fail
@codecov
Copy link

codecov bot commented Oct 22, 2021

Codecov Report

Merging #64 (3d0bc18) into master (1fb073c) will increase coverage by 0.19%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #64      +/-   ##
==========================================
+ Coverage   98.24%   98.43%   +0.19%     
==========================================
  Files           2        2              
  Lines          57       64       +7     
  Branches       10       12       +2     
==========================================
+ Hits           56       63       +7     
  Partials        1        1              
Impacted Files Coverage Δ
src/index.ts 100.00% <100.00%> (ø)

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 1fb073c...3d0bc18. Read the comment docs.

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