0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

hacks for NumberInt

This commit is contained in:
Eliot Horowitz 2011-07-05 10:52:13 -04:00
parent 6a83cf2cf9
commit 2116b44647

View File

@ -1099,6 +1099,15 @@ ReplSetTest.prototype.getPort = function( n ){
}
}
}
if ( typeof(n) == "object" && n.floatApprox )
n = n.floatApprox
// this is a hack for NumberInt
if ( n == 0 )
n = 0;
print( "n: " + n + " ports: " + tojson( this.ports ) + "\t" + this.ports[n] + " " + typeof(n) );
return this.ports[ n ];
}