moved migration hook to its own function

This commit is contained in:
ryan
2019-03-22 10:22:25 -07:00
parent a6c2a8c3cc
commit d8595e9f4e
3 changed files with 28 additions and 14 deletions

View File

@@ -98,10 +98,10 @@ export class DashboardPanel extends PureComponent<Props, State> {
}
panel.changeType(pluginId, hook);
}
} else if (plugin.exports && plugin.exports.reactPanel) {
const hook = plugin.exports.reactPanel.panelTypeChangedHook;
} else if (plugin.exports && plugin.exports.reactPanel && panel.options) {
const hook = plugin.exports.reactPanel.panelMigrationHook;
if (hook) {
panel.options = hook(panel.options || {}, null, null);
panel.options = hook(panel.options);
}
}