Skip to content

Commit 8cbbb8c

Browse files
committed
add fallback for gd._context
- Plots.supplyDefaults({data: [], layout: {}}) should work always!
1 parent e92aaa6 commit 8cbbb8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plots/plots.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ plots.supplyDefaults = function(gd) {
472472
newFullLayout._dataLength = newData.length;
473473

474474
// then do the data
475-
newFullLayout._globalTransforms = gd._context.globalTransforms;
475+
newFullLayout._globalTransforms = (gd._context || {}).globalTransforms;
476476
plots.supplyDataDefaults(newData, newFullData, newFullLayout);
477477

478478
// attach helper method to check whether a plot type is present on graph

0 commit comments

Comments
 (0)