@budibase/frontend-core 3.21.1 → 3.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@budibase/frontend-core",
3
- "version": "3.21.1",
3
+ "version": "3.21.2",
4
4
  "description": "Budibase frontend core libraries used in builder and client",
5
5
  "author": "Budibase",
6
6
  "license": "MPL-2.0",
@@ -17,5 +17,5 @@
17
17
  "shortid": "2.2.15",
18
18
  "socket.io-client": "^4.7.5"
19
19
  },
20
- "gitHead": "f418556d9428cc85c6d0ca8176d92904d57d3266"
20
+ "gitHead": "c040bbfadf1faab16b7e07a56037204de3e0a311"
21
21
  }
@@ -9,8 +9,11 @@ export default class JSONArrayFetch extends FieldFetch<JSONArrayFieldDatasource>
9
9
  // JSON arrays need their table definitions fetched.
10
10
  // We can then extract their schema as a subset of the table schema.
11
11
  try {
12
+ const { fieldName } = datasource
12
13
  const table = await this.API.fetchTableDefinition(datasource.tableId)
13
- const schema = getJSONArrayDatasourceSchema(table?.schema, datasource)
14
+ const schema =
15
+ table.schema[fieldName].schema ??
16
+ getJSONArrayDatasourceSchema(table.schema, datasource)
14
17
  return { schema }
15
18
  } catch (error) {
16
19
  return null