Skip to content

Commit 37f9d6f

Browse files
committed
Fix colorbar crash by ensuring traceOut.marker exists before colorscaleDefaults captures its reference
1 parent 9a17d8a commit 37f9d6f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/traces/quiver/defaults.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
6868
coerce('vhoverformat');
6969

7070
// Colorscale defaults (adds colorscale, showscale, colorbar, etc.)
71+
// Ensure traceOut.marker exists before colorscaleDefaults, which captures
72+
// a reference to it via npMaybe at the start of its execution.
73+
if(!traceOut.marker) traceOut.marker = {};
7174
coerce('marker.color');
7275
var withColorscale = hasColorscale(traceIn, 'marker') || (traceIn.marker || {}).coloraxis;
7376
traceOut._hasColorscale = !!withColorscale;

0 commit comments

Comments
 (0)