File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
components/dash-core-components/src/fragments Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -156,17 +156,12 @@ class PlotlyGraph extends Component {
156
156
) {
157
157
// in case we've have figure frames,
158
158
// we need to recreate frames before animation
159
- let result ;
160
159
if ( figure . frames ) {
161
- result = Plotly . deleteFrames ( gd ) . then ( ( ) => {
162
- return Plotly . addFrames ( gd , figure . frames ) . then ( ( ) => {
163
- return Plotly . animate ( gd , figure , animation_options ) ;
164
- } ) ;
165
- } ) ;
166
- } else {
167
- result = Plotly . animate ( gd , figure , animation_options ) ;
160
+ return Plotly . deleteFrames ( gd )
161
+ . then ( ( ) => Plotly . addFrames ( gd , figure . frames ) )
162
+ . then ( ( ) => Plotly . animate ( gd , figure , animation_options ) ) ;
168
163
}
169
- return result ;
164
+ return Plotly . animate ( gd , figure , animation_options ) ;
170
165
}
171
166
172
167
const configClone = this . getConfig ( config , responsive ) ;
You can’t perform that action at this time.
0 commit comments