Skip to content
Snippets Groups Projects
Commit 058559f0 authored by Tom Käsler's avatar Tom Käsler
Browse files

Add null check for room

parent 85fd9238
Branches
Tags
No related merge requests found
......@@ -89,7 +89,7 @@ export class CommentListComponent implements OnInit {
getComments(): void {
this.isLoading = false;
let commentThreshold = -10;
if (this.room.extensions && this.room.extensions['comments']) {
if (this.room && this.room.extensions && this.room.extensions['comments']) {
commentThreshold = this.room.extensions['comments'].commentThreshold;
if (this.hideCommentsList) {
this.filteredComments = this.filteredComments.filter( x => x.score >= commentThreshold );
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment