Merge pull request #479 from nofficalfs/PR-Bug-HasHistoryFilterNotExist
[Bug] 修复`Player#hasHistory`必须携带`filter`才能使用
This commit is contained in:
commit
d8ffa36703
|
@ -26753,6 +26753,7 @@
|
|||
},
|
||||
hasHistory:function(key,filter,last){
|
||||
const history=this.getHistory(key);
|
||||
if(!filter||typeof filter!="function") filter=lib.filter.all;
|
||||
if(last){
|
||||
const lastIndex=history.indexOf(last);
|
||||
return history.some((event,index)=>{
|
||||
|
|
Loading…
Reference in New Issue