Skip to content

Commit 6da9d0a

Browse files
authored
set oldVal to empty string if data is null
1 parent 2db4ea4 commit 6da9d0a

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
@@ -255,7 +255,7 @@
255255
if ($.inArray(keyCode, jMask.byPassKeys) === -1) {
256256
var newVal = p.getMasked(),
257257
caretPos = p.getCaret(),
258-
oldVal = el.data('mask-previus-value');
258+
oldVal = el.data('mask-previus-value') || '';
259259

260260
// this is a compensation to devices/browsers that don't compensate
261261
// caret positioning the right way

0 commit comments

Comments
 (0)