uPlot: Fix default value for plot legend visibility (#36660)

Fixed the condition, as the last part of `!seriesConfig.show ?? false`
will never be evaluated because `!seriesConfig.show` always yields a
boolean.
This commit is contained in:
Andreas Gerstmayr 2021-09-07 16:20:29 +02:00 committed by GitHub
parent 19d4213df6
commit 4e22823a49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,7 @@ export const PlotLegend: React.FC<PlotLegendProps> = ({
const seriesColor = scaleColor.color; const seriesColor = scaleColor.color;
return { return {
disabled: !seriesConfig.show ?? false, disabled: !(seriesConfig.show ?? true),
fieldIndex, fieldIndex,
color: seriesColor, color: seriesColor,
label, label,