@next-libs/cmdb-instances 7.21.6 → 7.21.7

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.
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
4
4
  import React, { useEffect, useReducer, useState, useRef, useMemo, useCallback } from "react";
5
- import { difference, isEmpty, isEqual, isString, map, uniq, union, filter, reject, sortBy, uniqueId, findIndex, find, startsWith, compact, omit, keyBy, isNil } from "lodash";
5
+ import { difference, isEmpty, isEqual, isString, map, uniq, union, filter, reject, sortBy, uniqueId, findIndex, find, startsWith, compact, omit, keyBy, isNil, get } from "lodash";
6
6
  import { BrickAsComponent, getRuntime, handleHttpError, useProvider } from "@next-core/brick-kit";
7
7
  import i18n from "i18next";
8
8
  import { K, NS_LIBS_CMDB_INSTANCES } from "../i18n/constants";
@@ -1189,7 +1189,9 @@ export function LegacyInstanceList(props) {
1189
1189
  if (!Array.isArray(query[key]) && isSpecialFn(query, key)) {
1190
1190
  queries.push(query);
1191
1191
  } else {
1192
- var fieldId = Object.keys(query[key][0])[0];
1192
+ var _Object$keys;
1193
+ // 多枚举值数据结构返回这种 {attrId: {$in:[]}}
1194
+ var fieldId = ((_Object$keys = Object.keys(get(query[key], "[0]", {}))) === null || _Object$keys === void 0 ? void 0 : _Object$keys[0]) || key;
1193
1195
  // 判断是否为结构体
1194
1196
  var isStruct = isOfStruct(modelData, fieldId);
1195
1197
  // 结构体情况处理