We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ceb15e0 + b13ff33 commit a656c21Copy full SHA for a656c21
src/vs/workbench/api/common/extHostTerminalService.ts
@@ -816,15 +816,12 @@ export abstract class BaseExtHostTerminalService extends Disposable implements I
816
}
817
818
private _getTerminalObjectIndexById<T extends ExtHostTerminal>(array: T[], id: ExtHostTerminalIdentifier): number | null {
819
- let index: number | null = null;
820
- array.some((item, i) => {
821
- const thisId = item._id;
822
- if (thisId === id) {
823
- index = i;
824
- return true;
825
- }
826
- return false;
+ const index = array.findIndex(item => {
+ return item._id === id;
827
});
+ if (index === -1) {
+ return null;
+ }
828
return index;
829
830
0 commit comments