We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 808b099 commit d507cfeCopy full SHA for d507cfe
packages/app/src/vis-packs/core/matrix/utils.ts
@@ -38,13 +38,16 @@ export function createNumericFormatter(
38
export function createBigIntFormatter(
39
notation: Notation,
40
): (val: ScalarValue<NumericType>) => string {
41
+ const formatter = createNumericFormatter(notation);
42
+
43
switch (notation) {
- case Notation.Scientific: {
- const formatter = createNumericFormatter(notation);
44
+ case Notation.Scientific:
45
return (val) => formatter(Number(val));
- }
46
47
default:
- return (val) => val.toString();
48
+ return (val) => {
49
+ return typeof val === 'bigint' ? val.toString() : formatter(val);
50
+ };
51
}
52
53
0 commit comments