File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -232,8 +232,8 @@ namespace ts {
232232
233233 // Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__'
234234 export function escapeIdentifier ( identifier : string ) : string {
235- const prefixWithUnderscore = identifier . length > 2 && identifier . charCodeAt ( 0 ) === CharacterCodes . _ && identifier . charCodeAt ( 1 ) === CharacterCodes . _ ;
236- return prefixWithUnderscore ? "_" + identifier : identifier ;
235+ const prefixedWithUnderscores = identifier . length >= 3 && identifier . charCodeAt ( 0 ) === CharacterCodes . _ && identifier . charCodeAt ( 1 ) === CharacterCodes . _ ;
236+ return prefixedWithUnderscores ? "_" + identifier : identifier ;
237237 }
238238
239239 // Remove extra underscore from escaped identifier
You can’t perform that action at this time.
0 commit comments