@gen3/core 0.12.20 → 0.12.22

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/esm/index.js CHANGED
@@ -1774,11 +1774,8 @@ const trimFirstFieldNameToTitle = (fieldName, trim = false)=>{
1774
1774
  * @param fieldName input filter expected to be: string.firstpart_secondpart
1775
1775
  * @param sections number of "sections" string.string.string to got back from the end of the field
1776
1776
  */ const fieldNameToTitle = (fieldName, sections = 1)=>{
1777
- if (fieldName in FieldNameOverrides) {
1778
- return FieldNameOverrides[fieldName];
1779
- }
1780
1777
  if (fieldName === undefined) return 'No Title';
1781
- return fieldName.split('.').slice(-sections).map((s)=>s.split('_')).flat().map((word)=>COMMON_PREPOSITIONS.includes(word) ? word : capitalize(word)).join(' ');
1778
+ return fieldName.split('.').slice(-sections).map((s)=>s.split('_')).flat().map((word)=>COMMON_PREPOSITIONS.includes(word) ? word : capitalize(word)).map((word)=>word in FieldNameOverrides ? FieldNameOverrides[word] : word).join(' ');
1782
1779
  };
1783
1780
  /**
1784
1781
  * Extracts the index name from the field name