From 8c25b0a3504d9e6709da01d957c35d097af8d0d9 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Wed, 21 Dec 2022 12:08:49 +0300 Subject: [PATCH] console error fixed --- resources/assets/js/components/AkauntingSearch.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/components/AkauntingSearch.vue b/resources/assets/js/components/AkauntingSearch.vue index 8b115990e..dbb8beef1 100644 --- a/resources/assets/js/components/AkauntingSearch.vue +++ b/resources/assets/js/components/AkauntingSearch.vue @@ -349,6 +349,7 @@ export default { onInputConfirm() { let path = window.location.href.replace(window.location.search, ''); let args = ''; + let redirect = true; if (this.search) { args += '?search="' + this.search + '" '; @@ -366,6 +367,11 @@ export default { args += '?search='; } + if (! this.selected_operator.length || ! this.selected_values.length) { + redirect = false; + return; + } + if (this.selected_operator[index].key == '!=') { args += 'not '; } @@ -388,7 +394,9 @@ export default { Cookies.set('search-string', search_string, expires); - window.location = path + args; + if (redirect) { + window.location = path + args; + } }, onOptionSelected(value) {