console error fixed

This commit is contained in:
Burak Civan 2022-12-21 12:08:49 +03:00
parent 4524c409b5
commit 8c25b0a350

View File

@ -349,6 +349,7 @@ export default {
onInputConfirm() { onInputConfirm() {
let path = window.location.href.replace(window.location.search, ''); let path = window.location.href.replace(window.location.search, '');
let args = ''; let args = '';
let redirect = true;
if (this.search) { if (this.search) {
args += '?search="' + this.search + '" '; args += '?search="' + this.search + '" ';
@ -366,6 +367,11 @@ export default {
args += '?search='; args += '?search=';
} }
if (! this.selected_operator.length || ! this.selected_values.length) {
redirect = false;
return;
}
if (this.selected_operator[index].key == '!=') { if (this.selected_operator[index].key == '!=') {
args += 'not '; args += 'not ';
} }
@ -388,7 +394,9 @@ export default {
Cookies.set('search-string', search_string, expires); Cookies.set('search-string', search_string, expires);
if (redirect) {
window.location = path + args; window.location = path + args;
}
}, },
onOptionSelected(value) { onOptionSelected(value) {