偶发性mui.back报错
Open
- Dominant language
- JavaScript
- Stars
- 13.5k
- Forks
- 6.5k
- PR merge metrics
- No merged PRs in 30d
Description
使用mui.js 2,8版本,报错信息如下:
> Uncaught TypeError: Cannot call method 'parent' of undefined at static/js/mui.js:2574
2574行的代码如下:
```
$.addBack({
name: '5+',
index: 10,
handle: function() {
if (!window.plus) {
return false;
}
var wobj = plus.webview.currentWebview();
var parent = wobj.parent(); // <-- 2548行
if (parent) {
parent.evalJS('mui&&mui.back();');
} else {
wobj.canBack(function(e) {
```
感觉是由于上一行的plus.webview.currentWebview()返回了undefined导致的。
感觉不管怎么调用,currentWebview不该为undefined啊?!plus的状态乱了吗?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.