From af0e85a956fa3c0bb43fbe6317f16f5e963f7c57 Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Fri, 15 Feb 2019 12:30:31 +0100 Subject: [PATCH] fix baseFilter for comments --- .../src/app/core/ui-services/base-filter-list.service.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client/src/app/core/ui-services/base-filter-list.service.ts b/client/src/app/core/ui-services/base-filter-list.service.ts index b2f49edff..e63106a0d 100644 --- a/client/src/app/core/ui-services/base-filter-list.service.ts +++ b/client/src/app/core/ui-services/base-filter-list.service.ts @@ -4,6 +4,7 @@ import { BehaviorSubject, Observable } from 'rxjs'; import { BaseModel } from '../../shared/models/base/base-model'; import { BaseViewModel } from '../../site/base/base-view-model'; import { StorageService } from '../core-services/storage.service'; +import { BaseRepository } from '../repositories/base-repository'; /** * Describes the available filters for a listView. @@ -103,9 +104,7 @@ export abstract class BaseFilterListService ) { // TODO - } + public constructor(private store: StorageService, private repo: BaseRepository) {} /** * Initializes the filterService. Returns the filtered data as Observable @@ -316,7 +315,7 @@ export abstract class BaseFilterListService { if (value === condition) { return true; - } else if ('id' in value && value.id === condition) { + } else if (typeof value === 'object' && 'id' in value && value.id === condition) { return true; } return false;