check if the current project is not null then add it to the list of projects (#10440)

pull/10447/head
Behrokh Satarnejad 3 years ago committed by GitHub
parent cbf91f69c4
commit cacd8a081a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      frontend/src/app/shared/components/project-include/project-include.component.ts

@ -114,11 +114,11 @@ export class OpProjectIncludeComponent extends UntilDestroyedMixin {
if (selectedProjectHrefs.includes(currentProjectHref)) {
return selectedProjectHrefs;
}
return [
...selectedProjectHrefs,
currentProjectHref,
];
const selectedPrjects = [...selectedProjectHrefs];
if (currentProjectHref) {
selectedPrjects.push(currentProjectHref);
}
return selectedPrjects;
}),
);

Loading…
Cancel
Save