Commit 82669596 by Torkel Ödegaard Committed by GitHub

StatPanels: Fixed possible migration issue (#21681)

parent b3d5e678
......@@ -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,
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment