From 25b7ccade35a1c6c46abd74b54709a98d245d495 Mon Sep 17 00:00:00 2001 From: Aasim Khan Date: Thu, 17 Sep 2020 13:28:21 -0700 Subject: [PATCH] Added awaits to change column setting (#12315) --- extensions/import/src/wizard/pages/summaryPage.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/extensions/import/src/wizard/pages/summaryPage.ts b/extensions/import/src/wizard/pages/summaryPage.ts index 138f67844e..bfa369b976 100644 --- a/extensions/import/src/wizard/pages/summaryPage.ts +++ b/extensions/import/src/wizard/pages/summaryPage.ts @@ -106,16 +106,19 @@ export class SummaryPage extends ImportPage { private async handleImport(): Promise { let changeColumnResults = []; - this.model.proseColumns.forEach((val, i, arr) => { + let i = 0; + + for (let val of this.model.proseColumns) { let columnChangeParams = { - index: i, + index: i++, newName: val.columnName, newDataType: val.dataType, newNullable: val.nullable, newInPrimaryKey: val.primaryKey }; - changeColumnResults.push(this.provider.sendChangeColumnSettingsRequest(columnChangeParams)); - }); + const changeColumnResult = await this.provider.sendChangeColumnSettingsRequest(columnChangeParams); + changeColumnResults.push(changeColumnResult); + } let result: InsertDataResponse; let err;