Skip to content

Commit

Permalink
fix: fix TypeScript error
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich authored Jun 2, 2019
1 parent 6ba2d93 commit 72e3036
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/createReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function composeMiddleware(chain) {
const createReducer = (...middlewares) => (reducer, initialState, initializer = value => value) => {
const ref = useRef(initializer(initialState))
const [, setState] = useState(ref.current)
let middlewareDispatch = () => {
let middlewareDispatch = (_ = {}) => {
throw new Error(
'Dispatching while constructing your middleware is not allowed. ' +
'Other middleware would not be applied to this dispatch.'
Expand Down

0 comments on commit 72e3036

Please sign in to comment.