summaryrefslogtreecommitdiff
path: root/src/mongo/shell/bulk_api.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/shell/bulk_api.js')
-rw-r--r--src/mongo/shell/bulk_api.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/shell/bulk_api.js b/src/mongo/shell/bulk_api.js
index 0afe20a9785..84dc583b1ea 100644
--- a/src/mongo/shell/bulk_api.js
+++ b/src/mongo/shell/bulk_api.js
@@ -43,8 +43,11 @@ var _bulk_api_module = (function() {
*/
var WriteConcern = function(wValue, wTimeout, jValue) {
- if (!(this instanceof WriteConcern))
- return new WriteConcern(wValue, wTimeout, jValue);
+ if (!(this instanceof WriteConcern)) {
+ var writeConcern = Object.create(WriteConcern.prototype);
+ WriteConcern.apply(writeConcern, arguments);
+ return writeConcern;
+ }
var opts = {};
if (typeof wValue == 'object') {