diff --git a/packages/cli/src/databases/migrations/sqlite/1659888469333-AddJsonKeyPinData.ts b/packages/cli/src/databases/migrations/sqlite/1659888469333-AddJsonKeyPinData.ts index 725be9a6f4913..d2c5c4a233473 100644 --- a/packages/cli/src/databases/migrations/sqlite/1659888469333-AddJsonKeyPinData.ts +++ b/packages/cli/src/databases/migrations/sqlite/1659888469333-AddJsonKeyPinData.ts @@ -78,7 +78,11 @@ function makeUpdateParams(fetchedWorkflows: PinData.FetchedWorkflow[]) { const newPinDataPerWorkflow = Object.keys(pinDataPerWorkflow).reduce( (newPinDataPerWorkflow, nodeName) => { - const pinDataPerNode = pinDataPerWorkflow[nodeName]; + let pinDataPerNode = pinDataPerWorkflow[nodeName]; + + if (!Array.isArray(pinDataPerNode)) { + pinDataPerNode = [pinDataPerNode]; + } if (pinDataPerNode.every((item) => item.json)) return newPinDataPerWorkflow;