From be27ef3b4682c5639039474c39ee0d234d16f482 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 10 Feb 2020 14:25:38 +0100 Subject: Strict templates enabled --- client/src/app/search/search-filters.component.html | 4 ++-- client/src/app/search/search.component.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'client/src/app/search') diff --git a/client/src/app/search/search-filters.component.html b/client/src/app/search/search-filters.component.html index c275285d5..60680c7bd 100644 --- a/client/src/app/search/search-filters.component.html +++ b/client/src/app/search/search-filters.component.html @@ -146,7 +146,7 @@ [(ngModel)]="advancedSearch.tagsAllOf" name="tagsAllOf" id="tagsAllOf" [validators]="tagValidators" [errorMessages]="tagValidatorsMessages" i18n-placeholder placeholder="+ Tag" i18n-secondaryPlaceholder secondaryPlaceholder="Enter a tag" - maxItems="5" modelAsStrings="true" + [maxItems]="5" [modelAsStrings]="true" > @@ -159,7 +159,7 @@ [(ngModel)]="advancedSearch.tagsOneOf" name="tagsOneOf" id="tagsOneOf" [validators]="tagValidators" [errorMessages]="tagValidatorsMessages" i18n-placeholder placeholder="+ Tag" i18n-secondaryPlaceholder secondaryPlaceholder="Enter a tag" - maxItems="5" modelAsStrings="true" + [maxItems]="5" [modelAsStrings]="true" > diff --git a/client/src/app/search/search.component.ts b/client/src/app/search/search.component.ts index dfd8d8823..075994dd3 100644 --- a/client/src/app/search/search.component.ts +++ b/client/src/app/search/search.component.ts @@ -141,7 +141,8 @@ export class SearchComponent implements OnInit, OnDestroy { return this.advancedSearch.size() } - removeVideoFromArray (video: Video) { + // Add VideoChannel for typings, but the template already checks "video" argument is a video + removeVideoFromArray (video: Video | VideoChannel) { this.results = this.results.filter(r => !this.isVideo(r) || r.id !== video.id) } -- cgit v1.2.3