Skip to content

Commit

Permalink
fix(taro-weapp): 微信小程序 redux props 不能被覆盖
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen-jj authored and luckyadam committed Apr 15, 2019
1 parent 972255e commit 684bcce
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/taro-weapp/src/create-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,10 @@ function bindEvents (weappComponentConf, events, isPage) {
}

export function filterProps (properties, defaultProps = {}, componentProps = {}, curProps) {
let newProps = {}
let newProps = Object.assign({}, curProps)
for (const propName in properties) {
if (propName in componentProps) {
newProps[propName] = componentProps[propName]
} else if (propName in curProps) {
newProps[propName] = curProps[propName]
}
}
if (!isEmptyObject(defaultProps)) {
Expand Down

0 comments on commit 684bcce

Please sign in to comment.