From 9abf6e2e564f20ae5f0d22fad8e622012adc097e Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Wed, 1 Jun 2022 10:56:33 +0530 Subject: [PATCH] fix: loop typo correction Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .../lib/noco/meta/api/sync/helpers/readAndProcessData.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/nocodb/src/lib/noco/meta/api/sync/helpers/readAndProcessData.ts b/packages/nocodb/src/lib/noco/meta/api/sync/helpers/readAndProcessData.ts index 2d69e39b69..03736cfea5 100644 --- a/packages/nocodb/src/lib/noco/meta/api/sync/helpers/readAndProcessData.ts +++ b/packages/nocodb/src/lib/noco/meta/api/sync/helpers/readAndProcessData.ts @@ -216,15 +216,11 @@ export async function importLTARData({ nestedLinkCnt += insertData.length; // Insert datas as chunks of size `ASSOC_BULK_DATA_BATCH_SIZE` - for ( - let i = 0; - i < insertData.length / ASSOC_BULK_DATA_BATCH_SIZE; - i += ASSOC_BULK_DATA_BATCH_SIZE - ) { + for (let i = 0; i < insertData.length; i += ASSOC_BULK_DATA_BATCH_SIZE) { logBasic( `:: Importing '${table.title}' LTAR data :: ${i + 1} - ${Math.min( i + ASSOC_BULK_DATA_BATCH_SIZE, - allData.length + insertData.length )}` ); await api.dbTableRow.bulkCreate(