Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ignoring second argument to JSON.stringify for JSON.encode (thanks ka…

…ssens)
  • Loading branch information...
commit bd14d7dfc92f6cf86feb53b2e1213455038d41e6 1 parent b43547b
@cpojer cpojer authored
Showing with 4 additions and 2 deletions.
  1. +3 −1 Source/Utilities/JSON.js
  2. +1 −1  Specs
View
4 Source/Utilities/JSON.js
@@ -43,7 +43,9 @@ JSON.validate = function(string){
return (/^[\],:{}\s]*$/).test(string);
};
-JSON.encode = JSON.stringify || function(obj){
+JSON.encode = JSON.stringify ? function(obj){
+ return JSON.stringify(obj);
+} : function(obj){
if (obj && obj.toJSON) obj = obj.toJSON();
switch (typeOf(obj)){
2  Specs
@@ -1 +1 @@
-Subproject commit 4a5b3971e3f6333124af3b1f9966721bf5b22933
+Subproject commit 05152e83c2237499c1bf8a80d86b1bba5bb3a631
Please sign in to comment.
Something went wrong with that request. Please try again.