Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions rethink-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ var readMethods = [
var tableDeps = {};

Rethink.Table = function (name, options) {
if (!(this instanceof Rethink.Table)) {
return new Rethink.Table(name, options);
}

options = options || {};

// Allow anonymous collections, but still give them some identifier
Expand Down
4 changes: 4 additions & 0 deletions rethink.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ try {
Rethink._connection = connection;

Rethink.Table = function (name, options) {
if (!(this instanceof Rethink.Table)) {
return new Rethink.Table(name, options);
}

var self = this;
options = options || {};

Expand Down