Skip to content

Commit

Permalink
fix(taro-weapp): 修复state上空对象变为有数据时,子组件不会去setData
Browse files Browse the repository at this point in the history
  • Loading branch information
waivital committed Jul 20, 2019
1 parent 95f4ad8 commit 6a3e69a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-weapp/src/lifecycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function doUpdate (component, prevProps, prevState) {
return
}
if (typeof val === 'object') {
if (isEmptyObject(val)) return safeSet(_data, key, val)
if (isEmptyObject(val)) return safeSet(_data, key, {})

val = shakeFnFromObject(val)
// 避免筛选完 Fn 后产生了空对象还去渲染
Expand Down

0 comments on commit 6a3e69a

Please sign in to comment.