From b4c045859070249e6800b3a96b7d286a5d312889 Mon Sep 17 00:00:00 2001 From: Snarling <84951833+Snarling@users.noreply.github.com> Date: Sun, 17 Oct 2021 03:11:42 -0400 Subject: [PATCH] Actually fix fragment power display for negative numbers Replace either -x% if present or just x%, to prevent --##.#% power display. --- src/CotMG/ui/FragmentInspector.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CotMG/ui/FragmentInspector.tsx b/src/CotMG/ui/FragmentInspector.tsx index 74a2e85ea..1573d49cb 100644 --- a/src/CotMG/ui/FragmentInspector.tsx +++ b/src/CotMG/ui/FragmentInspector.tsx @@ -55,7 +55,7 @@ export function FragmentInspector(props: IProps): React.ReactElement { charge = "N/A"; effect = `${f.power}x adjacent fragment power`; } else { - effect = Effect(f.type).replace("x%", numeralWrapper.formatPercentage(props.gift.effect(props.fragment) - 1)); + effect = Effect(f.type).replace(/-*x%/, numeralWrapper.formatPercentage(props.gift.effect(props.fragment) - 1)); } return (