[CST-5738] fix LGTM alert

This commit is contained in:
Giuseppe Digilio
2022-05-18 19:27:23 +02:00
parent 724fc3c6f0
commit 50184c8784

View File

@@ -35,7 +35,7 @@ export abstract class AuthRequestService {
protected getEndpointByMethod(endpoint: string, method: string, ...linksToFollow: FollowLinkConfig<AuthStatus>[]): string {
let url = isNotEmpty(method) ? `${endpoint}/${method}` : `${endpoint}`;
if (linksToFollow && linksToFollow.length > 0) {
if (linksToFollow?.length > 0) {
linksToFollow.forEach((link: FollowLinkConfig<AuthStatus>, index: number) => {
url += ((index === 0) ? '?' : '&') + `embed=${link.name}`;
});