Skip to content

Commit

Permalink
Fix "cannot read properties of null" (#1359)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyskoedijk authored Sep 28, 2024
1 parent c7c6642 commit 45fc539
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ export class AzureDevOpsWebApiClient {
const projects = await core.getProjects();
const projectGuid = projects?.find((p) => p.name === project)?.id;
const properties = await core.getProjectProperties(projectGuid);
return properties.map((p) => ({ [p.name]: p.value })).reduce((a, b) => ({ ...a, ...b }), {});
return properties?.map((p) => ({ [p.name]: p.value }))?.reduce((a, b) => ({ ...a, ...b }), {});
} catch (e) {
error(`Failed to get project properties: ${e}`);
console.debug(e); // Dump the error stack trace to help with debugging
Expand Down

0 comments on commit 45fc539

Please sign in to comment.