diff --git a/components/lib/basecomponent/BaseComponent.vue b/components/lib/basecomponent/BaseComponent.vue index 90e007b97..83fd1ae8b 100644 --- a/components/lib/basecomponent/BaseComponent.vue +++ b/components/lib/basecomponent/BaseComponent.vue @@ -487,8 +487,6 @@ export default { return ObjectUtils.isString(value) || ObjectUtils.isArray(value) ? { class: value } : value; }, _getPT(pt, key = '', callback) { - const _usept = pt?.['_usept']; - const getValue = (value, checkSameKey = false) => { const computedValue = callback ? callback(value) : value; const _key = ObjectUtils.toFlatCase(key); @@ -497,9 +495,9 @@ export default { return (checkSameKey ? (_key !== _cKey ? computedValue?.[_key] : undefined) : computedValue?.[_key]) ?? computedValue; }; - return ObjectUtils.isNotEmpty(_usept) + return pt?.hasOwnProperty('_usept') ? { - _usept, + _usept: pt['_usept'], originalValue: getValue(pt.originalValue), value: getValue(pt.value) } diff --git a/components/lib/basedirective/BaseDirective.js b/components/lib/basedirective/BaseDirective.js index 368d41689..1fe4d4cb6 100644 --- a/components/lib/basedirective/BaseDirective.js +++ b/components/lib/basedirective/BaseDirective.js @@ -33,8 +33,6 @@ const BaseDirective = { return mergeSections || (!mergeSections && self) ? (useMergeProps ? mergeProps(global, self, datasets) : { ...global, ...self, ...datasets }) : { ...self, ...datasets }; }, _getPT: (pt, key = '', callback) => { - const _usept = pt?.['_usept']; - const getValue = (value) => { const computedValue = callback ? callback(value) : value; const _key = ObjectUtils.toFlatCase(key); @@ -42,9 +40,9 @@ const BaseDirective = { return computedValue?.[_key] ?? computedValue; }; - return ObjectUtils.isNotEmpty(_usept) + return pt?.hasOwnProperty('_usept') ? { - _usept, + _usept: pt['_usept'], originalValue: getValue(pt.originalValue), value: getValue(pt.value) }