1
0
Fork 0
mirror of synced 2024-09-29 16:51:33 +13:00

fix: check if fields exists

This commit is contained in:
Hwansoo 2022-02-01 00:03:25 +09:00
parent 35671cb120
commit 241d04ed38

View file

@ -18,7 +18,9 @@ export default class QueryFetch extends DataFetch {
}
const definition = await fetchQueryDefinition(datasource._id)
// After getting the definition of query, it loses "fields" attribute because of security reason from the server. However, this attribute needs to be inside of defintion for pagination.
definition.fields = datasource.fields
if (!definition.fields) {
definition.fields = datasource.fields
}
return definition
}