Permalink
Browse files

fixed name/options bug

  • Loading branch information...
1 parent 379781f commit c22d5d245866eb906eaa0d3c0b005110e0be7719 Vinay Pulim committed Aug 24, 2011
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/collection.js
  2. +1 −1 lib/db.js
View
@@ -9,11 +9,11 @@ var Collection = function(name, options) {
}
Collection.prototype.getName = function() {
- return this.name;
+ return this._name;
};
Collection.prototype.getOptions = function() {
- return this.options;
+ return this._options;
};
Collection.prototype._connected = function(collection) {
View
@@ -78,7 +78,7 @@ Database.prototype._connected = function() {
self._isConnected = true;
self._waiting.forEach(function(collection) {
- db.collection(collection.name, collection.options, function(err, c) {
+ db.collection(collection.getName(), collection.getOptions(), function(err, c) {
if (err) {
self.emit('error', err);
}

0 comments on commit c22d5d2

Please sign in to comment.