diff --git a/public/app/plugins/panel/canvas/migrations.ts b/public/app/plugins/panel/canvas/migrations.ts index 5d0d92271e6..21e8122c884 100644 --- a/public/app/plugins/panel/canvas/migrations.ts +++ b/public/app/plugins/panel/canvas/migrations.ts @@ -25,14 +25,18 @@ export const canvasMigrationHandler = (panel: PanelModel): Partial => { for (const element of root.elements) { if (element.type === 'ellipse') { // Take existing ellipse specific background and border config and apply it to the element's general background and border config - element.background = element.config.backgroundColor; - element.border.color = element.config.borderColor; - element.border.width = element.config.width; - - // Remove the ellipse specific background and border config - delete element.config.backgroundColor; - delete element.config.borderColor; - delete element.config.width; + if (element.config.backgroundColor) { + element.background = element.config.backgroundColor; + delete element.config.backgroundColor; + } + if (element.config.borderColor) { + element.border.color = element.config.borderColor; + delete element.config.borderColor; + } + if (element.config.width) { + element.border.width = element.config.width; + delete element.config.width; + } } } }