@gen3/core 0.12.21 → 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/cjs/index.js CHANGED
@@ -1794,11 +1794,8 @@ const trimFirstFieldNameToTitle = (fieldName, trim = false)=>{
1794
1794
  * @param fieldName input filter expected to be: string.firstpart_secondpart
1795
1795
  * @param sections number of "sections" string.string.string to got back from the end of the field
1796
1796
  */ const fieldNameToTitle = (fieldName, sections = 1)=>{
1797
- if (fieldName in FieldNameOverrides) {
1798
- return FieldNameOverrides[fieldName];
1799
- }
1800
1797
  if (fieldName === undefined) return 'No Title';
1801
- return fieldName.split('.').slice(-sections).map((s)=>s.split('_')).flat().map((word)=>COMMON_PREPOSITIONS.includes(word) ? word : capitalize(word)).join(' ');
1798
+ 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(' ');
1802
1799
  };
1803
1800
  /**
1804
1801
  * Extracts the index name from the field name