Skip to content

Commit ed8457a

Browse files
committed
fix: Restore the original code
1 parent ebd26ff commit ed8457a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/core/echarts.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -744,8 +744,6 @@ class ECharts extends Eventful<ECEventDefinition> {
744744
return;
745745
}
746746

747-
const backup = typeof this.getOption === 'function' ? this.getOption() : null;
748-
749747
let silent = opts && opts.silent;
750748
let updateParams = null as UpdateLifecycleParams;
751749

@@ -763,6 +761,9 @@ class ECharts extends Eventful<ECEventDefinition> {
763761
try {
764762
this._updateTheme(theme);
765763
ecModel.setTheme(this._theme);
764+
765+
prepare(this);
766+
updateMethods.update.call(this, {type: 'setTheme'}, updateParams);
766767
}
767768
catch (e) {
768769
this[IN_MAIN_PROCESS_KEY] = false;
@@ -771,13 +772,7 @@ class ECharts extends Eventful<ECEventDefinition> {
771772

772773
this[IN_MAIN_PROCESS_KEY] = false;
773774

774-
if (backup) {
775-
this.setOption(backup as any, { notMerge: true, lazyUpdate: false, silent: !!silent });
776-
return;
777-
}
778775

779-
prepare(this);
780-
updateMethods.update.call(this, {type: 'setTheme'}, updateParams);
781776
flushPendingActions.call(this, silent);
782777
triggerUpdatedEvent.call(this, silent);
783778
}

0 commit comments

Comments
 (0)