fix(plugin-workflow): fix manual migration script (#1735)
This commit is contained in:
parent
8352f1a7a3
commit
edd2ec7fe6
@ -155,7 +155,7 @@ function migrateUsedConfig(config, manualForms) {
|
||||
}
|
||||
return `{{$jobsMapByNodeId.${id}.${manualForms[id]}${path || ''}}}`;
|
||||
});
|
||||
} else if (valueType === 'object') {
|
||||
} else if (valueType === 'object' && config[key]) {
|
||||
migrateUsedConfig(config[key], manualForms);
|
||||
}
|
||||
});
|
||||
@ -246,7 +246,7 @@ export default class extends Migration {
|
||||
|
||||
await usedNodes.reduce((promise, node) => promise.then(async () => {
|
||||
await node.update({
|
||||
config: migrateUsedConfig(cloneDeep(node.config), nodeForms)
|
||||
config: migrateUsedConfig(cloneDeep(node.config ?? {}), nodeForms)
|
||||
}, {
|
||||
silent: true,
|
||||
transaction
|
||||
|
Loading…
Reference in New Issue
Block a user