mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 09:41:20 -08:00
function-update-optimize (#549)
This commit is contained in:
1 parent
7fc369d210
commit
16994e446e
1 file changed
+4
-1
@@ -173,7 +173,10 @@ export default class Component {
|
|||||||
|
|
||||||
update(option) {
|
update(option) {
|
||||||
const item = this.cache.get(option.name);
|
const item = this.cache.get(option.name);
|
||||||
if (item) this.remove(option.name);
|
if (item) {
|
||||||
|
option = Object.assign(item.option, option);
|
||||||
|
this.remove(option.name);
|
||||||
|
}
|
||||||
return this.add(option);
|
return this.add(option);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user