diff --git a/components/lib/utils/ObjectUtils.js b/components/lib/utils/ObjectUtils.js index ac26f4a65c..fefccaa5fa 100644 --- a/components/lib/utils/ObjectUtils.js +++ b/components/lib/utils/ObjectUtils.js @@ -57,6 +57,15 @@ export default class ObjectUtils { } static resolveFieldData(data, field) { + try { + const value = data[field]; + + if (value) return value; + } catch { + // Performance optimization: https://github.com/primefaces/primereact/issues/4797 + // 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);