From 71d7ff67b271f3d26680e8275ec8f3fbefc43fb9 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Mon, 13 Dec 2021 10:24:54 +0100 Subject: [PATCH] fix bug in search --- src/app/pages/search/search.page.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/pages/search/search.page.ts b/src/app/pages/search/search.page.ts index 163c97e95..7181ae1c8 100644 --- a/src/app/pages/search/search.page.ts +++ b/src/app/pages/search/search.page.ts @@ -202,9 +202,10 @@ export class SearchPage implements OnInit { this.showSearchDocuments = this.sortArrayISODate(this.searchDocuments) } - - if(this.findOnly.length >= 1) { - this.showSearchDocuments = this.showSearchDocuments.filter((e)=> this.findOnly.includes(e.ApplicationType)) + if(this.findOnly){ + if(this.findOnly.length >= 1) { + this.showSearchDocuments = this.showSearchDocuments.filter((e)=> this.findOnly.includes(e.ApplicationType)) + } } }