ngx-mask 19.0.5 → 19.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/fesm2022/ngx-mask.mjs
CHANGED
|
@@ -256,12 +256,15 @@ class NgxMaskApplierService {
|
|
|
256
256
|
const precision = this.getPrecision(maskExpression);
|
|
257
257
|
let decimalMarker = this.decimalMarker;
|
|
258
258
|
if (Array.isArray(this.decimalMarker)) {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
: this.actualValue.includes(this.decimalMarker[0])
|
|
259
|
+
if (this.actualValue.includes(this.decimalMarker[0]) ||
|
|
260
|
+
this.actualValue.includes(this.decimalMarker[1])) {
|
|
261
|
+
decimalMarker = this.actualValue.includes(this.decimalMarker[0])
|
|
263
262
|
? this.decimalMarker[0]
|
|
264
263
|
: this.decimalMarker[1];
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
decimalMarker = this.decimalMarker.find((dm) => dm !== this.thousandSeparator);
|
|
267
|
+
}
|
|
265
268
|
}
|
|
266
269
|
if (backspaced) {
|
|
267
270
|
const { decimalMarkerIndex, nonZeroIndex } = this._findFirstNonZeroAndDecimalIndex(processedValue, decimalMarker);
|