From 9744d7796cb9db74c7a8ee3349bed57930d1f1b1 Mon Sep 17 00:00:00 2001 From: Anthony Dresser Date: Thu, 16 Jul 2020 11:48:51 -0700 Subject: [PATCH] fix array access issues with map iterators --- src/sql/base/browser/ui/panel/panel.ts | 2 +- .../services/accountManagement/browser/accountDialog.ts | 2 +- src/sql/workbench/services/query/common/gridDataProvider.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sql/base/browser/ui/panel/panel.ts b/src/sql/base/browser/ui/panel/panel.ts index 73fc1814ea..64ac8d94d5 100644 --- a/src/sql/base/browser/ui/panel/panel.ts +++ b/src/sql/base/browser/ui/panel/panel.ts @@ -284,7 +284,7 @@ export class TabbedPanel extends Disposable { } } if (!this._shownTabId && this._tabMap.size > 0) { - this.showTab(this._tabMap.values()[0].tab.identifier); + this.showTab(this._tabMap.values().next().value.tab.identifier); } } diff --git a/src/sql/workbench/services/accountManagement/browser/accountDialog.ts b/src/sql/workbench/services/accountManagement/browser/accountDialog.ts index 8de2cb578a..07ddf10d70 100644 --- a/src/sql/workbench/services/accountManagement/browser/accountDialog.ts +++ b/src/sql/workbench/services/accountManagement/browser/accountDialog.ts @@ -292,7 +292,7 @@ export class AccountDialog extends Modal { this._splitViewContainer.hidden = false; this._noaccountViewContainer.hidden = true; if (Iterable.consume(this._providerViewsMap.values()).length > 0) { - const firstView = this._providerViewsMap.values()[0]; + const firstView = this._providerViewsMap.values().next().value; if (firstView instanceof AccountPanel) { firstView.setSelection([0]); firstView.focus(); diff --git a/src/sql/workbench/services/query/common/gridDataProvider.ts b/src/sql/workbench/services/query/common/gridDataProvider.ts index 8dda4b49a1..8984e48a23 100644 --- a/src/sql/workbench/services/query/common/gridDataProvider.ts +++ b/src/sql/workbench/services/query/common/gridDataProvider.ts @@ -102,7 +102,7 @@ export async function getResultsString(provider: IGridDataProvider, selection: S let copyString = ''; if (includeHeaders) { - copyString = [...headers.values()].join('\t').concat(eol); + copyString = Array.from(headers.values()).join('\t').concat(eol); } const rowKeys = [...headers.keys()];