SUPPORT-8724: fix + remove locale parameter
This commit is contained in:
parent
5d7e666e72
commit
54eefae768
1 changed files with 4 additions and 3 deletions
|
|
@ -1,10 +1,11 @@
|
|||
import {TextFormatter} from "@webbpm/base-package";
|
||||
|
||||
export class NumberToLocalStringFormatter implements TextFormatter {
|
||||
public locale: string;
|
||||
|
||||
format(value: string): string {
|
||||
if (!value) {
|
||||
return value;
|
||||
}
|
||||
const numberValue = Number(value);
|
||||
return this.locale ? numberValue.toLocaleString(this.locale) : numberValue.toLocaleString();
|
||||
return numberValue ? numberValue.toLocaleString() : value;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue