Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/scenes/src/components/VizPanel/VizPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,11 @@ export class VizPanel<TOptions = {}, TFieldConfig extends {} = {}> extends Scene

_UNSAFE_customMigrationHandler?.(panel, plugin);

if (plugin.onPanelMigration && currentVersion !== pluginVersion && !isAfterPluginChange) {
if (
plugin.onPanelMigration &&
(currentVersion !== pluginVersion || plugin.shouldMigrate?.(panel)) &&
!isAfterPluginChange
) {
// These migration handlers also mutate panel.fieldConfig to migrate fieldConfig
panel.options = await plugin.onPanelMigration(panel);
}
Expand Down
Loading