Skip to content

Commit e418c8e

Browse files
authored
Merge pull request Expensify#68330 from Burhan-Rashid/fix/67323
fix: Missing tag violation message is not shown correctly when tagName is undefined
2 parents a469061 + 01a770c commit e418c8e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/libs/Violations/ViolationsUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ function getTagViolationsForMultiLevelTags(
167167
/**
168168
* Returns a period-separated string of violation messages for missing tag levels in a multi-level tag, based on error indexes.
169169
*/
170-
function getTagViolationMessagesForMultiLevelTags(tagName: string, errorIndexes: number[], tags: PolicyTagLists, translate: LocaleContextProps['translate']): string {
170+
function getTagViolationMessagesForMultiLevelTags(tagName: string | undefined, errorIndexes: number[], tags: PolicyTagLists, translate: LocaleContextProps['translate']): string {
171171
if (isEmpty(errorIndexes) || isEmpty(tags)) {
172172
return translate('violations.someTagLevelsRequired', {tagName});
173173
}
@@ -464,7 +464,7 @@ const ViolationsUtils = {
464464
surcharge = 0,
465465
invoiceMarkup = 0,
466466
maxAge = 0,
467-
tagName = '',
467+
tagName,
468468
taxName,
469469
type,
470470
rterType,

0 commit comments

Comments
 (0)