Skip to content

Commit

Permalink
fix: stop 'more in [language]' search from crashing for languages wit…
Browse files Browse the repository at this point in the history
…h special characters
  • Loading branch information
kevinstadler committed Sep 23, 2024
1 parent da7ee7b commit c6e43ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export async function getSameLanguagePublications(pub: Publication) {
await collection.documents().search({
q: "*",
per_page: 4,
filter_by: `language: ${pub.language} && id :!= [ ${[pub.id, ...(pub.later ?? [])].join()} ]`,
filter_by: `language: \`${pub.language}\` && id :!= [ ${[pub.id, ...(pub.later ?? [])].join()} ]`,
})
).hits?.map((r) => {
return r.document;
Expand Down

0 comments on commit c6e43ec

Please sign in to comment.