diff --git a/packages/taro-with-weapp/src/index.ts b/packages/taro-with-weapp/src/index.ts index f6f086e4f3d9..6bbaa3c97f74 100644 --- a/packages/taro-with-weapp/src/index.ts +++ b/packages/taro-with-weapp/src/index.ts @@ -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 || {}) } }