From 4a7d7e8a645b467012e7a23ff8ac3f84d9482d4b Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot <> Date: Tue, 5 Sep 2023 02:02:22 +0000 Subject: [PATCH 1/2] Update API doc --- doc/common/apidoc/index.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/common/apidoc/index.json b/doc/common/apidoc/index.json index 2bc2a8042..0c1d9a8bc 100644 --- a/doc/common/apidoc/index.json +++ b/doc/common/apidoc/index.json @@ -13344,7 +13344,7 @@ }, { "name": "fileSizeTypes", - "optional": true, + "optional": false, "readonly": false, "type": "string[]", "default": "" From 7f5657bcbd4cc714e725719ae0a4e07edd61c883 Mon Sep 17 00:00:00 2001 From: MoMack20 Date: Mon, 4 Sep 2023 22:08:36 -0400 Subject: [PATCH 2/2] Performance update for resolveFieldData (#4290) Object.keys can get expensive when called a lot of times. Adding a try catch for the quickest and probably highest use case can lead to big performance gains --- components/lib/utils/ObjectUtils.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/lib/utils/ObjectUtils.js b/components/lib/utils/ObjectUtils.js index 1b665c797..d3a101004 100755 --- a/components/lib/utils/ObjectUtils.js +++ b/components/lib/utils/ObjectUtils.js @@ -56,6 +56,15 @@ export default { }, resolveFieldData(data, field) { + try { + const value = data[field]; + if (value) + return value; + } + catch { + // do nothing and continue to other methods to resolve field data + } + if (data && Object.keys(data).length && field) { if (this.isFunction(field)) { return field(data);