mirror of
https://github.com/tenrok/maska.git
synced 2026-05-15 11:59:38 +03:00
Merge pull request #144 from killroyboy/master
avoid re-rendering input and therefore entering infinite update loop
This commit is contained in:
+1
-1
@@ -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] ?? ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user