回调Player#getStorage

This commit is contained in:
Spmario233 2024-01-26 22:42:23 +08:00
parent df3d942102
commit 6c6016e31b
1 changed files with 1 additions and 1 deletions

View File

@ -6227,7 +6227,7 @@ export class Player extends HTMLDivElement {
return value;
}
getStorage(name, defaultValue = []) {
return this.hasStorage(name) ? this.storage[name] : defaultValue;
return this.storage[name] || defaultValue;
}
hasStorage(name, value) {
if (!(name in this.storage)) return false;