Skip to content

Commit

Permalink
new build
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgob committed Jun 14, 2016
1 parent dda8cec commit 7188c73
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,18 @@ var set = exports.set = function set(target) {
};
var update = exports.update = function update(target, updateCB) {
return function (state, action) {
return updateIn(state, target, function (oldValue) {
var updateFinalCb = void 0;

if (typeof updateCB === 'function') updateFinalCb = function updateFinalCb(oldValue) {
return updateCB(oldValue, action.payload);
});
};else updateFinalCb = function updateFinalCb() {
return updateCB;
};

return updateIn(state, target, updateFinalCb);
};
};

var deepmerge = exports.deepmerge = function deepmerge(target) {
return function (state, action) {
return updateIn(state, target, function (obj) {
Expand Down

0 comments on commit 7188c73

Please sign in to comment.