File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff 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,6 @@ 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- }
778-
779- prepare ( this ) ;
780- updateMethods . update . call ( this , { type : 'setTheme' } , updateParams ) ;
781775 flushPendingActions . call ( this , silent ) ;
782776 triggerUpdatedEvent . call ( this , silent ) ;
783777 }
You can’t perform that action at this time.
0 commit comments