Merge pull request #479 from nofficalfs/PR-Bug-HasHistoryFilterNotExist

[Bug] 修复`Player#hasHistory`必须携带`filter`才能使用
This commit is contained in:
Spmario233 2023-10-07 12:47:46 +08:00 committed by GitHub
commit d8ffa36703
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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)=>{