-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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: Cannot read property '_num' of undefined #16641
Labels
A-runtime
Area - 运行时相关
Comments
This was referenced Oct 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
相关平台
微信小程序
小程序基础库: 3.2.2
使用框架: React
复现步骤
参考当前链接 https://juejin.cn/post/7166431631731851271
代码中存在useState , 组件存在onClick等事件
复现步骤
写一个组件通过useState来控制打开与关闭
const [isShowLogin, setIsShowLogin] = useState(false);
const handleCloseLogin = () => {
setIsShowLogin(!isShowLogin);
}
期望结果
期望程序能够正常运行
实际结果
程序直接报错 TypeError: Cannot read property '_num' of undefined
环境信息
补充信息
TypeError: Cannot read property '_num' of undefined
at TaroElement.removeEventListener (.._src_dom_element.ts:388)
at setEvent (.._src_props.ts:72)
at setProperty (.._src_props.ts:132)
at updatePropsByPayload (.._src_props.ts:22)
at commitUpdate (.._src_reconciler.ts:141)
at Rg (._node_modules_react-reconciler_cjs_react-reconciler.production.min.js:155)
at Ug (._node_modules_react-reconciler_cjs_react-reconciler.production.min.js:161)
at Th (._node_modules_react-reconciler_cjs_react-reconciler.production.min.js:189)
at Nh (._node_modules_react-reconciler_cjs_react-reconciler.production.min.js:187)
at Eh (._node_modules_react-reconciler_cjs_react-reconciler.production.min.js:177)(env: macOS,mp,1.06.2409131; lib: 3.2.2)
错误代码
public removeEventListener (type, handler, sideEffect = true) {
super.removeEventListener(type, handler)
}
The text was updated successfully, but these errors were encountered: