Fix undefineds

This commit is contained in:
Adria Navarro 2024-10-16 12:48:07 +02:00
parent 88d4ebc725
commit 830ed0cda2
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ export async function search(ctx: Ctx<SearchRowRequest, SearchRowResponse>) {
await context.ensureSnippetContext(true)
let { query } = ctx.request.body
if (!isPlainObject(query)) {
if (query && !isPlainObject(query)) {
const allTables = await sdk.tables.getAllTables()
query = replaceTableNamesInFilters(tableId, query, allTables)
}