redux-persist-transform-filter
Advanced tools
Comparing version 0.0.19 to 0.0.20
@@ -76,3 +76,3 @@ 'use strict'; | ||
var value = (0, _lodash2.default)(state, path); | ||
var value = (0, _lodash2.default)(state, path, state); | ||
@@ -121,3 +121,3 @@ if (value instanceof Array) { | ||
if (value instanceof Array) { | ||
(0, _lodash4.default)(subset, path.path, (0, _lodash2.default)(subset, path.path).filter(function (x) { | ||
(0, _lodash4.default)(subset, path.path, (0, _lodash2.default)(subset, path.path, subset).filter(function (x) { | ||
return false; | ||
@@ -130,2 +130,4 @@ })); | ||
} | ||
} else { | ||
subset = value; | ||
} | ||
@@ -132,0 +134,0 @@ } else { |
@@ -39,3 +39,3 @@ import { createTransform } from 'redux-persist'; | ||
function filterObject({ path, filterFunction = () => true }, state) { | ||
const value = get(state, path); | ||
const value = get(state, path, state); | ||
@@ -81,7 +81,9 @@ if (value instanceof Array) { | ||
if (value instanceof Array) { | ||
set(subset, path.path, get(subset, path.path).filter((x) => false)); | ||
set(subset, path.path, get(subset, path.path, subset).filter((x) => false)); | ||
} else { | ||
forIn(value, (value, key) => { unset(subset, `${path.path}[${key}]`) }); | ||
} | ||
} | ||
} else { | ||
subset = value; | ||
} | ||
} else { | ||
@@ -88,0 +90,0 @@ const value = get(state, path); |
{ | ||
"name": "redux-persist-transform-filter", | ||
"version": "0.0.19", | ||
"version": "0.0.20", | ||
"description": "Filter transformator for redux-persist", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12571
202