diff --git a/server/adaptors/integrations/repository/integration.ts b/server/adaptors/integrations/repository/integration.ts index 24388eff1..fe9ddd0ef 100644 --- a/server/adaptors/integrations/repository/integration.ts +++ b/server/adaptors/integrations/repository/integration.ts @@ -211,7 +211,7 @@ export class Integration { ); try { const ndjson = await fs.readFile(sobjPath, { encoding: 'utf-8' }); - const asJson = '[' + ndjson.replace(/\n/g, ',') + ']'; + const asJson = '[' + ndjson.trim().replace(/\n/g, ',') + ']'; const parsed = JSON.parse(asJson); result.savedObjects = parsed; } catch (err: any) {