Skip to content

Commit

Permalink
isCorrectFormatText bug fix. (#119)
Browse files Browse the repository at this point in the history
when text is null , there is an null.length error in isCorrectFormatText method fixed
  • Loading branch information
alicihad authored and canpolatoral committed Apr 26, 2019
1 parent 669ca4e commit 39dec85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/components/src/InputMask/InputMask.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ class InputMask extends EditorBase {
let saltText = '';
let count = 0;

this.isCorrectFormat = text === undefined || text.length > 0;
this.isCorrectFormat = text === undefined || text == null || text.length > 0;

if (text !== undefined) {
if (text) {
for (let i = 0; i < mask.length; i++) {
const m = mask[i];
const isExist = PredefinedMask.Regex[m] !== undefined;
Expand Down

0 comments on commit 39dec85

Please sign in to comment.