fix array access issues with map iterators

This commit is contained in:
Anthony Dresser
2020-07-16 11:48:51 -07:00
parent ac1237d51c
commit 9744d7796c
3 changed files with 3 additions and 3 deletions

View File

@@ -284,7 +284,7 @@ export class TabbedPanel extends Disposable {
} }
} }
if (!this._shownTabId && this._tabMap.size > 0) { if (!this._shownTabId && this._tabMap.size > 0) {
this.showTab(this._tabMap.values()[0].tab.identifier); this.showTab(this._tabMap.values().next().value.tab.identifier);
} }
} }

View File

@@ -292,7 +292,7 @@ export class AccountDialog extends Modal {
this._splitViewContainer.hidden = false; this._splitViewContainer.hidden = false;
this._noaccountViewContainer.hidden = true; this._noaccountViewContainer.hidden = true;
if (Iterable.consume(this._providerViewsMap.values()).length > 0) { 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) { if (firstView instanceof AccountPanel) {
firstView.setSelection([0]); firstView.setSelection([0]);
firstView.focus(); firstView.focus();

View File

@@ -102,7 +102,7 @@ export async function getResultsString(provider: IGridDataProvider, selection: S
let copyString = ''; let copyString = '';
if (includeHeaders) { if (includeHeaders) {
copyString = [...headers.values()].join('\t').concat(eol); copyString = Array.from(headers.values()).join('\t').concat(eol);
} }
const rowKeys = [...headers.keys()]; const rowKeys = [...headers.keys()];