2
0
mirror of https://github.com/tenrok/maska.git synced 2026-06-14 18:42:27 +03:00

Merge pull request #144 from killroyboy/master

avoid re-rendering input and therefore entering infinite update loop
This commit is contained in:
Alexander Shabunevich
2023-04-10 22:24:39 +03:00
committed by GitHub
+1 -1
View File
@@ -33,7 +33,7 @@ export class Mask {
if (Array.isArray(opts.mask)) { if (Array.isArray(opts.mask)) {
if (opts.mask.length > 1) { if (opts.mask.length > 1) {
opts.mask.sort((a, b) => a.length - b.length) opts.mask = [...opts.mask].sort((a, b) => a.length - b.length);
} else { } else {
opts.mask = opts.mask[0] ?? '' opts.mask = opts.mask[0] ?? ''
} }