Skip to content

Commit

Permalink
shorten syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
nerrad committed May 30, 2019
1 parent 5856f20 commit de2d19d
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ const useDispatchWithMap = ( dispatchMap ) => {
`Property ${ propName } returned from dispatchMap in useDispatchWithMap must be a function.`
);
}
return ( ...args ) => {
return currentDispatchMap.current( registry.dispatch, registry )[ propName ]( ...args );
};
return ( ...args ) => currentDispatchMap
.current( registry.dispatch, registry )[ propName ]( ...args );
}
);
}, [ dispatchMap, registry ] );
Expand Down

0 comments on commit de2d19d

Please sign in to comment.