mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 09:06:21 +01:00
no \n's in empty array json formatting
[ ] instead of [ ]
This commit is contained in:
parent
23326c222d
commit
ca426dd766
@ -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++){
|
||||
|
Loading…
Reference in New Issue
Block a user