@@ -41,7 +41,6 @@ export class NameMappingRegistry {
4141
4242 // Track Angular OmniScripts that should be skipped (Type_SubType_Language format)
4343 private angularOmniScriptRefs : Set < string > = new Set ( ) ;
44- private IS_STANDARD_DATA_MODEL = isStandardDataModel ( ) ;
4544
4645 public static getInstance ( ) : NameMappingRegistry {
4746 if ( ! NameMappingRegistry . instance ) {
@@ -150,8 +149,9 @@ export class NameMappingRegistry {
150149 public getOmniScriptCleanedName ( type : string , subType : string , language : string | 'English' ) : string {
151150 const originalName = `${ type } _${ subType } _${ language } ` ;
152151 // Check if we have a mapping for this OmniScript first
153- if ( this . omniScriptMappings . has ( originalName ) ) {
154- return this . omniScriptMappings . get ( originalName ) ! ;
152+ const mappedName = this . omniScriptMappings . get ( originalName ) ;
153+ if ( mappedName ) {
154+ return mappedName ;
155155 }
156156 // Fallback to cleaning individual parts
157157 const cleanedType = Stringutil . cleanName ( type ) ;
@@ -318,7 +318,7 @@ export class NameMappingRegistry {
318318 let subTypeField = 'SubType' ;
319319 let languageField = 'Language' ;
320320
321- if ( ! this . IS_STANDARD_DATA_MODEL ) {
321+ if ( ! isStandardDataModel ( ) ) {
322322 const fieldNames = Object . keys ( os ) ;
323323 typeField = fieldNames . find ( ( field ) => field . endsWith ( '__Type__c' ) ) || 'Type__c' ;
324324 subTypeField = fieldNames . find ( ( field ) => field . endsWith ( '__SubType__c' ) ) || 'SubType__c' ;
@@ -355,7 +355,7 @@ export class NameMappingRegistry {
355355 let subTypeField = 'SubType' ;
356356 let languageField = 'Language' ;
357357
358- if ( ! this . IS_STANDARD_DATA_MODEL ) {
358+ if ( ! isStandardDataModel ( ) ) {
359359 const fieldNames = Object . keys ( angularOs ) ;
360360 typeField = fieldNames . find ( ( field ) => field . endsWith ( '__Type__c' ) ) || 'Type__c' ;
361361 subTypeField = fieldNames . find ( ( field ) => field . endsWith ( '__SubType__c' ) ) || 'SubType__c' ;
@@ -382,7 +382,7 @@ export class NameMappingRegistry {
382382 let typeField = 'Type' ;
383383 let subTypeField = 'SubType' ;
384384
385- if ( ! this . IS_STANDARD_DATA_MODEL ) {
385+ if ( ! isStandardDataModel ( ) ) {
386386 // Extract namespace from field names (e.g., vlocity_ins__Type__c -> vlocity_ins)
387387 const fieldNames = Object . keys ( ip ) ;
388388 typeField = fieldNames . find ( ( field ) => field . endsWith ( '__Type__c' ) ) || 'Type__c' ;
0 commit comments