Skip to content

Commit

Permalink
Merge pull request #49 from webKrafters/immutable-tag-assignment
Browse files Browse the repository at this point in the history
auto-enforce immutability on set tag custom user defined resolve…
  • Loading branch information
steveswork authored Aug 25, 2023
2 parents 6c2a7c1 + 416fffa commit d82022d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,5 @@
"test:watch": "eslint --fix && jest --updateSnapshot --watchAll"
},
"types": "dist/main/index.d.ts",
"version": "4.6.1"
}
"version": "4.6.2"
}
2 changes: 1 addition & 1 deletion src/main/set-state/tag-functions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export const $set = (() => {
*/
const set = ( state, stateKey, stats, changes ) => {
if( toString.call( changes[ stateKey ][ SET_TAG ] ) === '[object Function]' ) {
changes[ stateKey ][ SET_TAG ] = changes[ stateKey ][ SET_TAG ]( clonedeep( state[ stateKey ] ) );
changes[ stateKey ][ SET_TAG ] = clonedeep( changes[ stateKey ][ SET_TAG ]( clonedeep( state[ stateKey ] ) ) );
}
applyReplaceCommand( SET_TAG, state, changes, stateKey, stats );
};
Expand Down

0 comments on commit d82022d

Please sign in to comment.