chore: fix bug
This commit is contained in:
@@ -11,8 +11,10 @@ export class DecimalTransformer implements ValueTransformer {
|
||||
// return new Decimal(value).toNumber();
|
||||
// }
|
||||
|
||||
to(value: Decimal | null): string | null {
|
||||
return value ? value.toString() : "0";
|
||||
to(value: Decimal | number | null): string | null {
|
||||
if (value === null) return "0";
|
||||
|
||||
return value instanceof Decimal ? value.toString() : new Decimal(value).toString();
|
||||
}
|
||||
|
||||
from(value: string | null): number {
|
||||
|
||||
Reference in New Issue
Block a user