2
0
mirror of https://github.com/tenrok/maska.git synced 2026-05-15 11:59:38 +03:00

avoid re-rendering input and therefore entering infinite update loop

This commit is contained in:
Dan Wilson
2023-04-04 16:32:40 -06:00
parent d0dbffe0ed
commit f0e638c804
+1 -1
View File
@@ -33,7 +33,7 @@ export class Mask {
if (Array.isArray(opts.mask)) {
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 {
opts.mask = opts.mask[0] ?? ''
}