From 35762251565d6c9660d8402e8fcf655ff55cd315 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 17 Dec 2021 14:41:52 +0100 Subject: Fix search result type auto filter --- client/src/app/shared/shared-search/advanced-search.model.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'client/src/app/shared/shared-search/advanced-search.model.ts') diff --git a/client/src/app/shared/shared-search/advanced-search.model.ts b/client/src/app/shared/shared-search/advanced-search.model.ts index 724c4d834..e40fd2e66 100644 --- a/client/src/app/shared/shared-search/advanced-search.model.ts +++ b/client/src/app/shared/shared-search/advanced-search.model.ts @@ -81,8 +81,8 @@ export class AdvancedSearch { this.languageOneOf = options.languageOneOf || undefined this.tagsOneOf = intoArray(options.tagsOneOf) this.tagsAllOf = intoArray(options.tagsAllOf) - this.durationMin = parseInt(options.durationMin, 10) - this.durationMax = parseInt(options.durationMax, 10) + this.durationMin = options.durationMin ? parseInt(options.durationMin, 10) : undefined + this.durationMax = options.durationMax ? parseInt(options.durationMax, 10) : undefined this.host = options.host || undefined @@ -216,7 +216,7 @@ export class AdvancedSearch { this.endDate !== undefined || this.originallyPublishedStartDate !== undefined || this.originallyPublishedEndDate !== undefined || - this.nsfw !== undefined !== undefined || + this.nsfw !== undefined || this.categoryOneOf !== undefined || this.licenceOneOf !== undefined || this.languageOneOf !== undefined || -- cgit v1.2.3