回调Player#getStorage
This commit is contained in:
parent
df3d942102
commit
6c6016e31b
|
@ -6227,7 +6227,7 @@ export class Player extends HTMLDivElement {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
getStorage(name, defaultValue = []) {
|
getStorage(name, defaultValue = []) {
|
||||||
return this.hasStorage(name) ? this.storage[name] : defaultValue;
|
return this.storage[name] || defaultValue;
|
||||||
}
|
}
|
||||||
hasStorage(name, value) {
|
hasStorage(name, value) {
|
||||||
if (!(name in this.storage)) return false;
|
if (!(name in this.storage)) return false;
|
||||||
|
|
Loading…
Reference in New Issue