Skip to content

Commit

Permalink
!isFinite
Browse files Browse the repository at this point in the history
  • Loading branch information
douglascrockford committed Mar 6, 2011
1 parent ad6079c commit 8e0b15c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions json_parse.js
@@ -1,6 +1,6 @@
/*
http://www.JSON.org/json_parse.js
2011-02-23
2011-03-06
Public Domain.
Expand Down Expand Up @@ -137,7 +137,7 @@ var json_parse = (function () {
}
}
number = +string;
if (isNaN(number)) {
if (!isFinite(number)) {
error("Bad number");
} else {
return number;
Expand Down

0 comments on commit 8e0b15c

Please sign in to comment.