Skip to content

Commit

Permalink
fix(links): fix build links error
Browse files Browse the repository at this point in the history
  • Loading branch information
HandsomeButterball authored and walkerkay committed Jul 4, 2020
1 parent 59ce8e1 commit ccd638a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions example/src/app/gantt/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const mockItems = [
start: 1590035675,
group_id: '00001',
color: '#FF0000',
links: ['item-0301'],
children: [
{
id: 'item-child-0101',
Expand All @@ -54,6 +55,12 @@ export const mockItems = [
end: 1592018400,
group_id: '00001'
},
{
id: 'item-0104',
title: 'VERSION 0104',
group_id: '00001',
links: ['item-0301']
},
{
id: 'item-0201',
title: 'VERSION 0201',
Expand Down
2 changes: 1 addition & 1 deletion packages/gantt/src/components/links/links.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class GanttLinksComponent implements OnInit, OnChanges, OnDestroy {
if (source.origin.start || source.origin.end) {
source.links.forEach((linkId) => {
const target = this.linkItems.find((item) => item.id === linkId);
if (target) {
if (target && (target.origin.start || target.origin.end)) {
this.links.push({
path: this.generatePath(source, target),
source: source.origin,
Expand Down

0 comments on commit ccd638a

Please sign in to comment.