Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: this.advancedSearchCriteria.some is not a function #1767

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions peachjam/js/components/FindDocuments/AdvancedSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,10 @@ export default {
handler (newValue) {
// When disabling calendar set date input values to null
if (newValue) {
this.$emit('update:modelValue', {
...this.modelValue,
date: {
date_from: null,
date_to: null
}
this.$emit('date-change', {
...this.advancedSearchDateCriteria,
date_from: null,
date_to: null
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion peachjam/js/components/FindDocuments/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ export default {

async search (pushState = true) {
// if one of the search fields is true perform search
if (this.q || this.advancedSearchCriteria.some(f => f.text)) {
if (this.q || (Array.isArray(this.advancedSearchCriteria) && this.advancedSearchCriteria.some(f => f.text))) {
this.loadingCount = this.loadingCount + 1;

// scroll to put the search box at the top of the window
Expand Down
Loading