From 55843af631f4c82f2fcf324cd7763a26f296705f Mon Sep 17 00:00:00 2001 From: Etienne Delclaux Date: Wed, 3 Jul 2024 19:44:16 +0200 Subject: [PATCH] fix: add optional chaining to search-dependant --- .../zh-search-dependant/zh-search-dependant.component.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/app/zh-search/zh-search-items/components/zh-search-dependant/zh-search-dependant.component.ts b/frontend/app/zh-search/zh-search-items/components/zh-search-dependant/zh-search-dependant.component.ts index 61993e43..4f88c6ff 100644 --- a/frontend/app/zh-search/zh-search-items/components/zh-search-dependant/zh-search-dependant.component.ts +++ b/frontend/app/zh-search/zh-search-items/components/zh-search-dependant/zh-search-dependant.component.ts @@ -34,16 +34,14 @@ export class ZhSearchDependantComponent implements OnInit { this.enable(); this._inputData = value; } else { - if (this.form) { - this.form.reset(); - } + this.form?.reset(); this.disable(); } } disable() { - this.form.disable(); + this.form?.disable(); } enable() { - this.form.enable(); + this.form?.enable(); } }