清空播放列表时出现错误
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
list.js:195 Uncaught TypeError: Cannot set property 'parsed' of undefined
at e.value (list.js:195)
at HTMLDivElement. (36:397)
{
key: 'clear',
value: function clear() {
this.player.events.trigger('listclear');
this.index = 0;
this.player.container.classList.remove('aplayer-withlist');
this.player.pause();
this.audios = [];
**this.lrc.parsed = [];** // 这行 出现错误
this.player.audio.src = '';
this.player.template.listOl.innerHTML = '';
this.player.template.pic.style.backgroundImage = '';
this.player.theme(this.player.options.theme, this.index, false);
this.player.template.title.innerHTML = 'No audio';
this.player.template.author.innerHTML = '';
this.player.bar.set('loaded', 0, 'width');
this.player.template.dtime.innerHTML = _utils2.default.secondToTime(0);
}
}
用这种办法暂时解决了
if(!ap.list.lrc) {
ap.list.lrc = {};
}
ap.list.clear();
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.