@@ -1263,9 +1263,7 @@ Plotly.extendTraces = function extendTraces(gd, update, indices, maxPoints) {
12631263 var promise = Plotly . redraw ( gd ) ;
12641264
12651265 var undoArgs = [ gd , undo . update , indices , undo . maxPoints ] ;
1266- if ( Queue ) {
1267- Queue . add ( gd , Plotly . prependTraces , undoArgs , extendTraces , arguments ) ;
1268- }
1266+ Queue . add ( gd , Plotly . prependTraces , undoArgs , extendTraces , arguments ) ;
12691267
12701268 return promise ;
12711269} ;
@@ -1292,9 +1290,7 @@ Plotly.prependTraces = function prependTraces(gd, update, indices, maxPoints) {
12921290 var promise = Plotly . redraw ( gd ) ;
12931291
12941292 var undoArgs = [ gd , undo . update , indices , undo . maxPoints ] ;
1295- if ( Queue ) {
1296- Queue . add ( gd , Plotly . extendTraces , undoArgs , prependTraces , arguments ) ;
1297- }
1293+ Queue . add ( gd , Plotly . extendTraces , undoArgs , prependTraces , arguments ) ;
12981294
12991295 return promise ;
13001296} ;
@@ -1342,7 +1338,7 @@ Plotly.addTraces = function addTraces(gd, traces, newIndices) {
13421338 // i.e., we can simply redraw and be done
13431339 if ( typeof newIndices === 'undefined' ) {
13441340 promise = Plotly . redraw ( gd ) ;
1345- if ( Queue ) Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1341+ Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
13461342 return promise ;
13471343 }
13481344
@@ -1365,10 +1361,10 @@ Plotly.addTraces = function addTraces(gd, traces, newIndices) {
13651361
13661362 // if we're here, the user has defined specific places to place the new traces
13671363 // this requires some extra work that moveTraces will do
1368- if ( Queue ) Queue . startSequence ( gd ) ;
1369- if ( Queue ) Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1364+ Queue . startSequence ( gd ) ;
1365+ Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
13701366 promise = Plotly . moveTraces ( gd , currentIndices , newIndices ) ;
1371- if ( Queue ) Queue . stopSequence ( gd ) ;
1367+ Queue . stopSequence ( gd ) ;
13721368 return promise ;
13731369} ;
13741370
@@ -1409,8 +1405,7 @@ Plotly.deleteTraces = function deleteTraces(gd, indices) {
14091405 }
14101406
14111407 var promise = Plotly . redraw ( gd ) ;
1412-
1413- if ( Queue ) Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1408+ Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
14141409
14151410 return promise ;
14161411} ;
@@ -1508,8 +1503,7 @@ Plotly.moveTraces = function moveTraces(gd, currentIndices, newIndices) {
15081503 gd . data = newData ;
15091504
15101505 var promise = Plotly . redraw ( gd ) ;
1511-
1512- if ( Queue ) Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1506+ Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
15131507
15141508 return promise ;
15151509} ;
@@ -1955,9 +1949,7 @@ Plotly.restyle = function restyle(gd, astr, val, traces) {
19551949
19561950 // now all attribute mods are done, as are redo and undo
19571951 // so we can save them
1958- if ( Queue ) {
1959- Queue . add ( gd , restyle , [ gd , undoit , traces ] , restyle , [ gd , redoit , traces ] ) ;
1960- }
1952+ Queue . add ( gd , restyle , [ gd , undoit , traces ] , restyle , [ gd , redoit , traces ] ) ;
19611953
19621954 // do we need to force a recalc?
19631955 var autorangeOn = false ;
@@ -2375,9 +2367,7 @@ Plotly.relayout = function relayout(gd, astr, val) {
23752367 }
23762368 // now all attribute mods are done, as are
23772369 // redo and undo so we can save them
2378- if ( Queue ) {
2379- Queue . add ( gd , relayout , [ gd , undoit ] , relayout , [ gd , redoit ] ) ;
2380- }
2370+ Queue . add ( gd , relayout , [ gd , undoit ] , relayout , [ gd , redoit ] ) ;
23812371
23822372 // calculate autosizing - if size hasn't changed,
23832373 // will remove h&w so we don't need to redraw
0 commit comments