Skip to content

Commit eba3571

Browse files
committed
Fix ng-pattern in form-field-text
1 parent 0cb55c7 commit eba3571

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gentelella/form-field-text/form-field-text.component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ angular
2929
self.$onInit = function () {
3030
if (!self.fieldType) self.fieldType = 'text';
3131
// http://stackoverflow.com/questions/28731451/is-it-possible-to-use-ng-pattern-with-a-variable
32-
self.pattern = new RegExp(self.fieldPattern);
32+
if (self.fieldPattern) self.pattern = new RegExp(self.fieldPattern);
3333
}
3434
}
3535
]

0 commit comments

Comments
 (0)