Skip to content

Commit 6983b40

Browse files
committed
if data does not exist the undefined error is avoid
1 parent 12518dc commit 6983b40

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/app/submission/edit/submission-edit.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export class SubmissionEditComponent implements OnDestroy, OnInit {
117117
*/
118118
ngOnInit() {
119119

120-
this.collectionModifiable = this.route.snapshot.data.collectionModifiable ?? null;
120+
this.collectionModifiable = this.route.snapshot.data?.collectionModifiable ?? null;
121121

122122
this.subs.push(
123123
this.route.paramMap.pipe(

0 commit comments

Comments
 (0)