Fixed additive modifier description using + on negative modifiers

This commit is contained in:
thepaperpilot 2022-05-20 08:46:49 -05:00
parent 061b4f24da
commit 1e6104a349

View file

@ -64,7 +64,10 @@ export function createAdditiveModifier<
? undefined ? undefined
: jsx(() => ( : jsx(() => (
<div class="modifier-container"> <div class="modifier-container">
<span class="modifier-amount">+{format(unref(processedAddend))}</span> <span class="modifier-amount">
{Decimal.gte(unref(processedAddend), 0) ? "+" : ""}
{format(unref(processedAddend))}
</span>
{unref(processedDescription) ? ( {unref(processedDescription) ? (
<span class="modifier-description"> <span class="modifier-description">
{/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */} {/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */}