use firstElementFieldName()

This commit is contained in:
dwight
2011-05-23 10:49:50 -04:00
parent bd5b607137
commit 8a0660ac31
16 changed files with 28 additions and 28 deletions

View File

@@ -531,7 +531,7 @@ namespace mongo {
JSObject * toJSObject( const BSONObj * obj , bool readOnly=false ) {
static string ref = "$ref";
if ( ref == obj->firstElement().fieldName() ) {
if ( ref == obj->firstElementFieldName() ) {
JSObject * o = JS_NewObject( _context , &dbref_class , NULL, NULL);
CHECKNEWOBJECT(o,_context,"toJSObject1");
assert( JS_SetPrivate( _context , o , (void*)(new BSONHolder( obj->getOwned() ) ) ) );