Skip to content

Commit 93a5fca

Browse files
committed
Mask: Renaming empty to isEmpty to match with isValid
1 parent c00071b commit 93a5fca

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ui/jquery.ui.mask.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ $.widget( "ui.mask", {
110110
bufferLength = this.buffer.length,
111111
value = "";
112112

113-
this.empty = this.isValid = true;
113+
this.isEmpty = this.isValid = true;
114114
for ( bufferPosition = 0; bufferPosition < bufferLength; bufferPosition += bufferObject.length ) {
115115
bufferObject = this.buffer[ bufferPosition ];
116116
if ( bufferObject.literal && !raw ) {
117117
value += bufferObject.literal;
118118
} else if ( bufferObject.value ) {
119-
this.empty = false;
119+
this.isEmpty = false;
120120
value += bufferObject.value;
121121
for ( counter = bufferObject.value.length; counter < bufferObject.length; counter++ ) {
122122
value += this.options.placeholder;
@@ -255,10 +255,10 @@ $.widget( "ui.mask", {
255255
if ( focused === undefined ) {
256256
focused = this.element[ 0 ] === document.activeElement;
257257
}
258-
// calling _getValue updates empty
258+
// calling _getValue updates isEmpty
259259
var value = this._getValue();
260260

261-
if ( this.options.clearEmpty && this.empty && !focused ) {
261+
if ( this.options.clearEmpty && this.isEmpty && !focused ) {
262262
this.element.val( "" );
263263
} else {
264264
this.element.val( value );

0 commit comments

Comments
 (0)