Skip to content

Commit 4048924

Browse files
authored
v0.3.2
* fix(dataReducer): deleting object properties updates data state (reverts fix for #49) - #71
2 parents 524e631 + c7af296 commit 4048924

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "redux-firestore",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"description": "Redux bindings for Firestore.",
55
"main": "lib/index.js",
66
"module": "es/index.js",

src/reducers/dataReducer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { get } from 'lodash';
2-
import { setWith, merge } from 'lodash/fp';
2+
import { setWith, assign } from 'lodash/fp';
33
import { actionTypes } from '../constants';
44
import { pathFromMeta, preserveValuesFromState } from '../utils/reducers';
55

@@ -50,7 +50,7 @@ export default function dataReducer(state = {}, action) {
5050
return setWith(Object, pathFromMeta(meta), data, state);
5151
}
5252
// Otherwise merge with existing data
53-
const mergedData = merge(previousData, data);
53+
const mergedData = assign(previousData, data);
5454
// Set data to state (with merge) immutabily (lodash/fp's setWith creates copy)
5555
return setWith(Object, pathFromMeta(meta), mergedData, state);
5656
case DELETE_SUCCESS:

0 commit comments

Comments
 (0)