Skip to content

Commit 24d3537

Browse files
committed
fix adding traces
1 parent 84fb86a commit 24d3537

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/EditorControls.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ class EditorControls extends Component {
156156
const prevTrace = graphDiv.data[graphDiv.data.length - 1];
157157
const prevTraceType = plotlyTraceToCustomTrace(prevTrace);
158158
graphDiv.data.push(
159-
traceTypeToPlotlyInitFigure(prevTraceType, prevTrace.type.endsWith('gl') ? 'gl' : '')
159+
traceTypeToPlotlyInitFigure(
160+
prevTraceType,
161+
prevTrace.type && prevTrace.type.endsWith('gl') ? 'gl' : ''
162+
)
160163
);
161164
}
162165

0 commit comments

Comments
 (0)