mirror of
https://github.com/tenrok/maska.git
synced 2026-06-05 16:42:28 +03:00
Cleanup of mask.js code
This commit is contained in:
+2
-3
@@ -16,9 +16,8 @@ export default function mask (value, mask, tokens, masked = true) {
|
||||
}
|
||||
iv++
|
||||
} else if (token && token.repeat) {
|
||||
const maskCharPrev = mask[im - 1]
|
||||
const tokenPrev = tokens[maskCharPrev]
|
||||
if (token && token.repeat && tokenPrev && !tokenPrev.pattern.test(valueChar)) {
|
||||
const tokenPrev = tokens[mask[im - 1]]
|
||||
if (tokenPrev && !tokenPrev.pattern.test(valueChar)) {
|
||||
im++
|
||||
} else {
|
||||
im--
|
||||
|
||||
Reference in New Issue
Block a user