@steedos-widgets/amis-lib 1.3.4-beta.16 → 1.3.4-beta.17

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/dist/index.esm.js CHANGED
@@ -10716,7 +10716,7 @@ const getRecordPermissions = async (objectName, recordId)=>{
10716
10716
  * @Author: baozhoutao@steedos.com
10717
10717
  * @Date: 2022-07-05 15:55:39
10718
10718
  * @LastEditors: liaodaxue
10719
- * @LastEditTime: 2023-09-25 17:18:08
10719
+ * @LastEditTime: 2023-10-23 15:55:46
10720
10720
  * @Description:
10721
10721
  */
10722
10722
 
@@ -11007,11 +11007,15 @@ async function getRelatedListSchema(
11007
11007
  ctx
11008
11008
  ) {
11009
11009
  const uiSchema = await getUISchema(objectName);
11010
+ if(!uiSchema){
11011
+ return {}
11012
+ }
11013
+ const listViewNames = map(uiSchema.list_views, 'name');
11010
11014
  const listView = find(
11011
11015
  uiSchema.list_views,
11012
11016
  (listView, name) => {
11013
- // 传入listViewName空值则取第一个
11014
- if(!listViewName){
11017
+ // 传入listViewName空值 或者 不存在 则取第一个
11018
+ if(!listViewName || listViewNames.indexOf(listViewName)<0){
11015
11019
  listViewName = name;
11016
11020
  }
11017
11021
  return name === listViewName || listView._id === listViewName;