chore - ES6, use for-of instead of forEach

This commit is contained in:
Johannes Rieken
2020-06-12 16:16:41 +02:00
parent a1feacf5c4
commit 28cb90be8c
19 changed files with 75 additions and 97 deletions

View File

@@ -28,11 +28,11 @@ export class ExtHostEditorInsets implements ExtHostEditorInsetsShape {
// dispose editor inset whenever the hosting editor goes away
this._disposables.add(_editors.onDidChangeVisibleTextEditors(() => {
const visibleEditor = _editors.getVisibleTextEditors();
this._insets.forEach(value => {
for (const value of this._insets.values()) {
if (visibleEditor.indexOf(value.editor) < 0) {
value.inset.dispose(); // will remove from `this._insets`
}
});
}
}));
}