File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -744,8 +744,6 @@ class ECharts extends Eventful<ECEventDefinition> {
744
744
return ;
745
745
}
746
746
747
- const backup = typeof this . getOption === 'function' ? this . getOption ( ) : null ;
748
-
749
747
let silent = opts && opts . silent ;
750
748
let updateParams = null as UpdateLifecycleParams ;
751
749
@@ -763,6 +761,9 @@ class ECharts extends Eventful<ECEventDefinition> {
763
761
try {
764
762
this . _updateTheme ( theme ) ;
765
763
ecModel . setTheme ( this . _theme ) ;
764
+
765
+ prepare ( this ) ;
766
+ updateMethods . update . call ( this , { type : 'setTheme' } , updateParams ) ;
766
767
}
767
768
catch ( e ) {
768
769
this [ IN_MAIN_PROCESS_KEY ] = false ;
@@ -771,13 +772,7 @@ class ECharts extends Eventful<ECEventDefinition> {
771
772
772
773
this [ IN_MAIN_PROCESS_KEY ] = false ;
773
774
774
- if ( backup ) {
775
- this . setOption ( backup as any , { notMerge : true , lazyUpdate : false , silent : ! ! silent } ) ;
776
- return ;
777
- }
778
775
779
- prepare ( this ) ;
780
- updateMethods . update . call ( this , { type : 'setTheme' } , updateParams ) ;
781
776
flushPendingActions . call ( this , silent ) ;
782
777
triggerUpdatedEvent . call ( this , silent ) ;
783
778
}
You can’t perform that action at this time.
0 commit comments