fix: negative resistance with polarized modules (#167)
Some checks failed
Publish / Publish storybook (push) Has been cancelled
Testing / Testing (push) Has been cancelled

This commit is contained in:
undefined
2025-12-30 18:52:52 +08:00
committed by GitHub
parent b0e5a31762
commit 3d6d6322e8

View File

@@ -109,6 +109,9 @@ export function useAttribute(type: "Ship" | "Char", props: AttributeProps): { va
if (Object.is(value, -0)) {
value = 0;
}
if (props.isResistance) {
value = Math.max(value, 0);
}
return {
value: value.toLocaleString("en", {