From 64579b8e66230bc5ed48c49b1b5ad122440dd944 Mon Sep 17 00:00:00 2001 From: Paul Thiel Date: Sun, 28 May 2023 19:30:39 +0200 Subject: [PATCH] fix(InputNumber): formatting of currencies with suffix --- components/lib/inputnumber/InputNumber.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/inputnumber/InputNumber.vue b/components/lib/inputnumber/InputNumber.vue index f8f639c2a..510feedb5 100755 --- a/components/lib/inputnumber/InputNumber.vue +++ b/components/lib/inputnumber/InputNumber.vue @@ -906,7 +906,7 @@ export default { this._decimal.lastIndex = 0; if (this.suffixChar) { - return val1.replace(this.suffixChar, '').split(this._decimal)[0] + val2.replace(this.suffixChar, '').slice(decimalCharIndex) + this.suffixChar; + return decimalCharIndex !== -1 ? val1.replace(this.suffixChar, '').split(this._decimal)[0] + val2.replace(this.suffixChar, '').slice(decimalCharIndex) + this.suffixChar : val1; } else { return decimalCharIndex !== -1 ? val1.split(this._decimal)[0] + val2.slice(decimalCharIndex) : val1; }