Skip to content

Commit

Permalink
use path array for omit
Browse files Browse the repository at this point in the history
  • Loading branch information
nerrad committed Mar 6, 2019
1 parent 429b515 commit 1a588ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/data/src/store/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ const topLevelIsResolved = ( state = {}, action ) => {
switch ( action.type ) {
case 'INVALIDATE_RESOLUTION_FOR_STORE':
return has( state, action.reducerKey ) ?
omit( state, action.reducerKey ) :
omit( state, [ action.reducerKey ] ) :
state;
case 'INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR':
return has( state, [ action.reducerKey, action.selectorName ] ) ?
{
...state,
[ action.reducerKey ]: omit(
state[ action.reducerKey ],
action.selectorName
[ action.selectorName ]
),
} :
state;
Expand Down

0 comments on commit 1a588ee

Please sign in to comment.