Browse Source

fix gettest case see issue #1843

Robin Herbots 7 years ago
parent
commit
cc530c8469
1 changed files with 1 additions and 1 deletions
  1. 1 1
      js/inputmask.js

+ 1 - 1
js/inputmask.js

@@ -1130,7 +1130,7 @@
                                         amndx = parseInt(altIndexArr[ndx]);
                                         amndx = parseInt(altIndexArr[ndx]);
                                         matches = [];
                                         matches = [];
                                         //set the correct ndxInitializer
                                         //set the correct ndxInitializer
-                                        ndxInitializer = resolveNdxInitializer(testPos, amndx, loopNdxCnt) || ndxInitializerClone.slice();
+                                        ndxInitializer = typeof altIndex === "string" ? resolveNdxInitializer(testPos, amndx, loopNdxCnt) || ndxInitializerClone.slice() : ndxInitializerClone.slice();
                                         if (alternateToken.matches[amndx] && handleMatch(alternateToken.matches[amndx], [amndx].concat(loopNdx), quantifierRecurse))
                                         if (alternateToken.matches[amndx] && handleMatch(alternateToken.matches[amndx], [amndx].concat(loopNdx), quantifierRecurse))
                                             match = true;
                                             match = true;