Skip to content

Commit

Permalink
fix(with-weapp): 当 this.$router.params 没有值时赋一个空对象, close #2234
Browse files Browse the repository at this point in the history
  • Loading branch information
yuche committed Mar 15, 2019
1 parent 76bc1c8 commit 43eb400
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-with-weapp/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default function withWeapp (componentType: string) {
componentWillMount () {
this.executeComponentFunc(this.created)
if (super.componentWillMount) {
super.componentWillMount.call(this, this.$router.params)
super.componentWillMount.call(this, this.$router.params || {})
}
}

Expand Down

0 comments on commit 43eb400

Please sign in to comment.