浏览代码

Fix Saving issue

causefx 9 年之前
父节点
当前提交
383ce51926
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      functions.php

+ 1 - 1
functions.php

@@ -1250,7 +1250,7 @@ function buildSettings($array) {
 					if (this.type == \'checkbox\') {
 					if (this.type == \'checkbox\') {
 						newVals[this.name] = this.checked;
 						newVals[this.name] = this.checked;
 					} else {
 					} else {
-						if (this.value && !RegExp(\'^\'+this.pattern+\'$\').test(this.value)) { errorFields.push(this.name); }
+						if (this.value && this.pattern && !RegExp(\'^\'+this.pattern+\'$\').test(this.value)) { errorFields.push(this.name); }
 						var fieldVal = $(this).val();
 						var fieldVal = $(this).val();
 						if (typeof fieldVal == \'object\') {
 						if (typeof fieldVal == \'object\') {
 							if (typeof fieldVal.join == \'function\') {
 							if (typeof fieldVal.join == \'function\') {