0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 17:10:48 +01:00

no \n's in empty array json formatting

[ ] instead of

[

]
This commit is contained in:
Kristina Chodorow 2010-01-08 15:09:00 -05:00
parent 23326c222d
commit ca426dd766

View File

@ -217,6 +217,10 @@ Array.tojson = function( a , indent ){
if (!indent)
indent = "";
if (a.length == 0) {
return "[ ]";
}
var s = "[\n";
indent += "\t";
for ( var i=0; i<a.length; i++){