Skip to content

Commit

Permalink
KevinSheedy#19 - Resolved the issue : by type checking because in JS …
Browse files Browse the repository at this point in the history
…0=='' is true
  • Loading branch information
sandeepcisin241 authored and sandeepcisin241 committed Mar 12, 2014
1 parent 97124fd commit 1a5d93d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jquery.alphanum.js
Expand Up @@ -395,7 +395,7 @@

var maxDigits = settings.maxDigits;

if(maxDigits == "" || isNaN(maxDigits))
if(maxDigits === "" || isNaN(maxDigits))
return false; // In this case, there is no maximum

var numDigits = countDigits(string);
Expand All @@ -410,7 +410,7 @@

var maxDecimalPlaces = settings.maxDecimalPlaces;

if(maxDecimalPlaces == "" || isNaN(maxDecimalPlaces))
if(maxDecimalPlaces === "" || isNaN(maxDecimalPlaces))
return false; // In this case, there is no maximum

var indexOfDecimalPoint = string.indexOf(DEC_SEP);
Expand All @@ -431,7 +431,7 @@

var maxPreDecimalPlaces = settings.maxPreDecimalPlaces;

if(maxPreDecimalPlaces == "" || isNaN(maxPreDecimalPlaces))
if(maxPreDecimalPlaces === "" || isNaN(maxPreDecimalPlaces))
return false; // In this case, there is no maximum

var indexOfDecimalPoint = string.indexOf(DEC_SEP);
Expand Down

0 comments on commit 1a5d93d

Please sign in to comment.