mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Histogram: Fix crash when state was undefined (when combine was enabled) (#34514)
This commit is contained in:
@@ -57,7 +57,7 @@ export const VisualizationSelectPane: FC<Props> = ({ panel }) => {
|
||||
const match = filterPluginList(plugins, query, plugin.meta);
|
||||
|
||||
if (match && match.length) {
|
||||
onPluginTypeChange(match[0], true);
|
||||
onPluginTypeChange(match[0], false);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -123,7 +123,8 @@ const prepConfig = (frame: DataFrame, theme: GrafanaTheme2) => {
|
||||
for (let i = 2; i < frame.fields.length; i++) {
|
||||
const field = frame.fields[i];
|
||||
|
||||
field.state!.seriesIndex = seriesIndex++;
|
||||
field.state = field.state ?? {};
|
||||
field.state.seriesIndex = seriesIndex++;
|
||||
|
||||
const customConfig = { ...field.config.custom };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user