Check options.fields are in the table.

This commit is contained in:
mike12345567 2024-10-01 10:25:15 +01:00
parent 6e660151bd
commit 975e348de5
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ export async function search(
if (options.query) {
const visibleFields = (
options.fields || Object.keys(table.schema)
).filter(field => table.schema[field].visible !== false)
).filter(field => table.schema[field]?.visible !== false)
const queryableFields = await getQueryableFields(table, visibleFields)
options.query = removeInvalidFilters(options.query, queryableFields)