File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -1087,15 +1087,19 @@ plots.purge = function(gd) {
1087
1087
if ( fullLayout . _glcontainer !== undefined ) fullLayout . _glcontainer . remove ( ) ;
1088
1088
if ( fullLayout . _geocontainer !== undefined ) fullLayout . _geocontainer . remove ( ) ;
1089
1089
1090
- // Ensure any dangling callbacks are simply dropped if the plot is purged.
1091
- // This is more or less only actually important for testing.
1092
- gd . _transitionData . _interruptCallbacks . length = 0 ;
1093
-
1094
1090
// remove modebar
1095
1091
if ( fullLayout . _modeBar ) fullLayout . _modeBar . destroy ( ) ;
1096
1092
1097
- if ( gd . _transitionData && gd . _transitionData . _animationRaf ) {
1098
- window . cancelAnimationFrame ( gd . _transitionData . _animationRaf ) ;
1093
+ if ( gd . _transitionData ) {
1094
+ // Ensure any dangling callbacks are simply dropped if the plot is purged.
1095
+ // This is more or less only actually important for testing.
1096
+ if ( gd . _transitionData . _interruptCallbacks ) {
1097
+ gd . _transitionData . _interruptCallbacks . length = 0 ;
1098
+ }
1099
+
1100
+ if ( gd . _transitionData . _animationRaf ) {
1101
+ window . cancelAnimationFrame ( gd . _transitionData . _animationRaf ) ;
1102
+ }
1099
1103
}
1100
1104
1101
1105
// data and layout
You can’t perform that action at this time.
0 commit comments