Fix local API empty search results loading forever (#3770)

This commit is contained in:
absidue 2023-07-13 02:49:47 +02:00 committed by GitHub
parent 35868b408f
commit 0ba63d5405
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -411,7 +411,8 @@ function handleSearchResponse(response) {
return {
results,
continuationData: response.has_continuation ? response : null
// check the length of the results, as there can be continuations for things that we've filtered out, which we don't want
continuationData: response.has_continuation && results.length > 0 ? response : null
}
}

View File

@ -114,10 +114,6 @@ export default defineComponent({
try {
const { results, continuationData } = await getLocalSearchResults(payload.query, payload.searchSettings, this.showFamilyFriendlyOnly)
if (results.length === 0) {
return
}
this.apiUsed = 'local'
this.shownResults = results