mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
* Adds check in embeddable fn migration to migrate only by value embedables
* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 346840b032
)
This commit is contained in:
parent
ca10ce05bf
commit
b290b13cbc
1 changed files with 5 additions and 3 deletions
|
@ -62,10 +62,12 @@ export function embeddableFunctionFactory({
|
|||
const embeddableInput = decode(state.arguments.config[0] as string);
|
||||
|
||||
const embeddableType = state.arguments.type[0];
|
||||
const migratedInput = migrateFn({ ...embeddableInput, type: embeddableType });
|
||||
|
||||
state.arguments.config[0] = encode(migratedInput);
|
||||
state.arguments.type[0] = migratedInput.type as string;
|
||||
if (embeddableInput.explicitInput.attributes || embeddableInput.explicitInput.savedVis) {
|
||||
const migratedInput = migrateFn({ ...embeddableInput, type: embeddableType });
|
||||
state.arguments.config[0] = encode(migratedInput);
|
||||
state.arguments.type[0] = migratedInput.type as string;
|
||||
}
|
||||
|
||||
return state;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue