Skip to content

Commit c716cc4

Browse files
committed
more safeguards
1 parent 6407d23 commit c716cc4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/widgets/TraceTypeSelector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class TraceTypeSelector extends Component {
8383
} = this.props;
8484
const computedValue = traceTypeToPlotlyInitFigure(value);
8585
if (
86-
(type.endsWith('gl') || (!TRACES_WITH_GL.includes(type) && glByDefault)) &&
86+
((type && type.endsWith('gl')) || (!TRACES_WITH_GL.includes(type) && glByDefault)) &&
8787
TRACES_WITH_GL.includes(computedValue.type) &&
8888
!computedValue.type.endsWith('gl')
8989
) {

src/lib/customTraceType.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,6 @@ export function traceTypeToPlotlyInitFigure(traceType, gl = '') {
9797
type: 'cone',
9898
};
9999
default:
100-
return {type: traceType};
100+
return {type: traceType ? traceType : 'scatter'};
101101
}
102102
}

0 commit comments

Comments
 (0)