浏览代码

Merge pull request #1479 from kheyse-autodesk/feature/static_keyword

static is a reserved keyword
Robin Herbots 9 年之前
父节点
当前提交
5cf3de8b5d
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      js/inputmask.js

+ 5 - 5
js/inputmask.js

@@ -2630,11 +2630,11 @@
 
 		function renderColorMask(input, buffer, caretPos) {
 			function handleStatic() {
-				if (!static && (test.fn === null || testPos.input === undefined)) {
-					static = true;
+				if (!isStatic && (test.fn === null || testPos.input === undefined)) {
+					isStatic = true;
 					maskTemplate += "<span class='im-static''>"
-				} else if (static && (test.fn !== null && testPos.input !== undefined)) {
-					static = false;
+				} else if (isStatic && (test.fn !== null && testPos.input !== undefined)) {
+					isStatic = false;
 					maskTemplate += "</span>"
 				}
 			}
@@ -2647,7 +2647,7 @@
 					caretPos = {begin: caretPos, end: caretPos};
 				}
 
-				var maskTemplate = "", static = false;
+				var maskTemplate = "", isStatic = false;
 				if (buffer != "") {
 					var ndxIntlzr, pos = 0,
 						test, testPos, lvp = getLastValidPosition();