-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<TypeError: undefined is not an object(evalusting 'vm.$app.hooks')> #2356
Comments
这个问题怎么样了?有什么临时的解决办法么?现在遇到了同样的问题,小程序一旦触发就会失去响应,挺严重的 |
同问 遇到同样的问题,有时候vm 为 WepyComponent 有$app 属性 有时候没有,没有的时候调用hook直接报错,程序崩溃
|
找到临时解决方案: // if (vm._init) {
// dirty = callUserHook(vm, 'before-setData', dirty);
// } 同时 app.wpy 不使用 before-setData |
手动去操作还是挺麻烦的,这里写了个插件 wepy-remove-before-set-data |
Duplicates: #2486 这个问题之前定位到了,并且在这个版本 |
在自定义组件里面用组件,会报错
代码结构
The text was updated successfully, but these errors were encountered: