mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
StatPanels: Fixed possible migration issue (#21681)
This commit is contained in:
parent
b3d5e678f4
commit
8266959681
@ -151,11 +151,10 @@ export function sharedSingleStatMigrationHandler(panel: PanelModel<SingleStatBas
|
||||
|
||||
// Migrate color from simple string to a mode
|
||||
const { defaults } = fieldOptions;
|
||||
if (defaults.color) {
|
||||
const old = defaults.color;
|
||||
if (defaults.color && typeof defaults.color === 'string') {
|
||||
defaults.color = {
|
||||
mode: FieldColorMode.Fixed,
|
||||
fixedColor: old,
|
||||
fixedColor: defaults.color,
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user