Skip to content

Commit 2f0017f

Browse files
author
Igor Escobar
committed
fixing exception when oValue in undefined
1 parent 0a28124 commit 2f0017f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jquery.mask.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@
188188
},
189189
calculateCaretPosition: function(caretPos, newVal) {
190190
var newValL = newVal.length,
191-
oValue = el.data('mask-previus-value'),
191+
oValue = el.data('mask-previus-value') || "",
192192
oValueL = oValue.length;
193193

194194
// edge cases when erasing digits

0 commit comments

Comments
 (0)