fix: Correct display text for generic value comparison

Check if percent capture group is undefined OR empty
This commit is contained in:
FoxxMD
2022-04-12 08:53:55 -04:00
parent f0eb1f040e
commit 26a563def3

View File

@@ -714,7 +714,7 @@ export const parseGenericValueOrPercentComparison = (val: string): GenericCompar
value: Number.parseFloat(groups.value),
isPercent: groups.percent !== '',
extra: groups.extra,
displayText: `${groups.opStr} ${groups.value}${groups.percent === undefined ? '': '%'}`
displayText: `${groups.opStr} ${groups.value}${groups.percent === undefined || groups.percent === '' ? '': '%'}`
}
}