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:
parent
6a83cf2cf9
commit
2116b44647
@ -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 ];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user