Skip to content

Commit a5f2087

Browse files
committed
add early return to functions called by setTimeout when gd._fullLayout is undefined
1 parent 3c6ec3a commit a5f2087

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/plots/cartesian/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ exports.finalizeSubplots = function(layoutIn, layoutOut) {
126126
*/
127127
exports.plot = function(gd, traces, transitionOpts, makeOnCompleteCallback) {
128128
var fullLayout = gd._fullLayout;
129-
if(!fullLayout._subplots) return;
130129
var subplots = fullLayout._subplots.cartesian;
131130
var calcdata = gd.calcdata;
132131
var i;

src/plots/plots.js

+2
Original file line numberDiff line numberDiff line change
@@ -2720,6 +2720,7 @@ plots.transitionFromReact = function(gd, restyleFlags, relayoutFlags, oldFullLay
27202720
}
27212721

27222722
function transitionAxes() {
2723+
if(!gd._fullLayout) return;
27232724
for(var j = 0; j < basePlotModules.length; j++) {
27242725
if(basePlotModules[j].transitionAxes) {
27252726
basePlotModules[j].transitionAxes(gd, axEdits, axisTransitionOpts, makeCallback);
@@ -2728,6 +2729,7 @@ plots.transitionFromReact = function(gd, restyleFlags, relayoutFlags, oldFullLay
27282729
}
27292730

27302731
function transitionTraces() {
2732+
if(!gd._fullLayout) return;
27312733
for(var j = 0; j < basePlotModules.length; j++) {
27322734
basePlotModules[j].plot(gd, transitionedTraces, traceTransitionOpts, makeCallback);
27332735
}

0 commit comments

Comments
 (0)