Adding length check back for get row.

This commit is contained in:
mike12345567 2024-02-27 09:58:06 +00:00
parent c11527d539
commit c0bb03e938
1 changed files with 1 additions and 1 deletions

View File

@ -346,7 +346,7 @@ export class ExternalRequest<T extends Operation> {
endpoint: getEndpoint(table._id!, Operation.READ),
filters: buildFilters(rowId, {}, table),
})
if (Array.isArray(response)) {
if (Array.isArray(response) && response.length > 0) {
return response[0]
} else {
throw new Error(`Cannot fetch row by ID "${rowId}"`)