From 16994e446ef3016e13cd4beeb04485c722aadb46 Mon Sep 17 00:00:00 2001 From: O2bmm Date: Fri, 2 Jun 2023 15:18:03 +0800 Subject: [PATCH] function-update-optimize (#549) --- packages/artplayer/src/utils/component.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/artplayer/src/utils/component.js b/packages/artplayer/src/utils/component.js index aac1ebe87..8180f3d55 100644 --- a/packages/artplayer/src/utils/component.js +++ b/packages/artplayer/src/utils/component.js @@ -173,7 +173,10 @@ export default class Component { update(option) { 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); } }