Skip to content

Commit

Permalink
fix: add build pre release
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Aug 22, 2018
1 parent 336fc21 commit 12fdd1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"test:prod": "npm run lint && npm run test -- --coverage --no-cache",
"report-coverage": "cat ./coverage/lcov.info | coveralls",
"commit": "git-cz",
"prerelease": "yarn build",
"release": "np",
"precommit": "lint-staged"
},
Expand Down
5 changes: 3 additions & 2 deletions src/reworm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ export function create<T = any>(initial: T = {} as T): State<T> {
return this.props.children(this._state)
}

private update = (next: T): void => {
const nextState = typeof next === 'function' ? next(this._state) : next
private update = (next: any): void => {
const nextState: T = typeof next === 'function' ? next(this._state) : next

const newState = !isPrimitive(nextState)
? Object.assign({}, this._state, nextState)
: nextState
Expand Down

0 comments on commit 12fdd1e

Please sign in to comment.