call results constructor taking a table when no query is provided

This commit is contained in:
Ari Lazier 2015-11-25 19:59:51 -08:00
parent 39e3b017a4
commit 8a00a2f92a
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ JSObjectRef RJSResultsCreate(JSContextRef ctx, SharedRealm realm, std::string cl
if (object_schema == realm->config().schema->end()) { if (object_schema == realm->config().schema->end()) {
throw std::runtime_error("Object type '" + className + "' not present in Realm."); throw std::runtime_error("Object type '" + className + "' not present in Realm.");
} }
return RJSWrapObject<Results *>(ctx, RJSResultsClass(), new Results(realm, *object_schema, table->where())); return RJSWrapObject<Results *>(ctx, RJSResultsClass(), new Results(realm, *object_schema, *table));
} }