Skip to content

Commit

Permalink
fix undefined for parent.id in Review component
Browse files Browse the repository at this point in the history
  • Loading branch information
kokole110 committed Jan 31, 2022
1 parent 8691f11 commit 8a11b43
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class ReviewsComponent implements OnInit, OnDestroy {
filter((rating: Rate[]) => !!rating?.length),
takeUntil(this.destroy$),
).subscribe((rating: Rate[]) => {
this.isRated = rating?.some((rate: Rate) => rate.parentId === this.parent.id);
this.isRated = rating?.some((rate: Rate) => rate.parentId === this.parent?.id);
});
}

Expand Down

0 comments on commit 8a11b43

Please sign in to comment.