SvgAnimatedString missing method indexOf
- Dominant language
- JavaScript
- Stars
- 13.5k
- Forks
- 6.5k
- PR merge metrics
- No merged PRs in 30d
Description
在界面中使用svg图形时,当点击或是滑动界面的时候提示错误
SvgAnimatedString has no method indexOf
经过跟踪代码定位到在mui.js大约1325行
```
}(mui, window, document, "offcanvas"), function (a, b) {
var c = "mui-action", d = function (a, b) {
return b.className && ~b.className.indexOf(c) ? (a.preventDefault(), b) : !1
};
a.registerTarget({name: b, index: 50, handle: d, target: !1, isContinue: !0})
```
b.className为SvgAnimatedString类型,但是这个类型没有indexOf方法,将代码改为
```
}(mui, window, document, "offcanvas"), function (a, b) {
var c = "mui-action", d = function (a, b) {
return b.className &&b.className.indexOf&& ~b.className.indexOf(c) ? (a.preventDefault(), b) : !1
};
a.registerTarget({name: b, index: 50, handle: d, target: !1, isContinue: !0})
```
这样就不会报错了
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.