@uxda/appkit 4.0.18 → 4.1.0

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.js CHANGED
@@ -311,6 +311,7 @@ function useCrypto(config) {
311
311
  return result;
312
312
  };
313
313
  const resolve = (list, field) => {
314
+ if (list.length === 0) return [];
314
315
  const [first] = list, f = field ? Array.isArray(field) ? field : [field] : Object.entries(first).filter(([_, v]) => /^\{.*\}$/.test(v)).map(([k]) => k);
315
316
  return list.map((item) => {
316
317
  let result = { ...item };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxda/appkit",
3
- "version": "4.0.18",
3
+ "version": "4.1.0",
4
4
  "description": "小程序应用开发包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.ts",
@@ -48,6 +48,7 @@ export function useCrypto (config?: CryptoConfig) {
48
48
  * @returns
49
49
  */
50
50
  const resolve = (list: any[], field?: string | string[]) => {
51
+ if (list.length === 0) return []
51
52
  const [first] = list,
52
53
  f = field
53
54
  ? Array.isArray(field) ? field : [field]