Replace map with forEach (#115378)

The callback provided to the map call on this array should return a value, otherwise map will always return an array of undefined values. If the desired behaviour is to just iterate through all elements, then consider using forEach or a for-of loop instead.
This commit is contained in:
Matvii Hodovaniuk 2021-06-07 21:01:10 +03:00 committed by GitHub
parent feeeb58be0
commit 67561036cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,7 +125,7 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid
}
});
this._sessions.map(session => {
this._sessions.forEach(session => {
const matchesExisting = storedSessions.some(s => s.id === session.id);
// Another window has logged out, remove from our state
if (!matchesExisting) {