Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-676

Bulk.execute() throwing 'undefined is not a function' in Meteor v1.2.1

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.1.10
    • Affects Version/s: 1.4.39
    • Component/s: None
    • Environment:
      OS X, Meteor v1.2.1

      I'm not sure is it appropriate, but I've tried to use Bulk.execute() without a callback and it gives me an error.

      I'm using Meteor v1.2.1 and have the following code:

      bug.js
      var bulk = Collection.rawCollection().initializeUnorderedBulkOp();
      ...
      bulk.execute();
      

      And it throws the following error:

      error.txt
      (STDERR) TypeError: undefined is not a function
      (STDERR)     at .../.meteor/packages/npm-mongo/.1.4.39_1.17b8oex++os+web.browser+web.cordova/npm/node_modules/mongodb/lib/mongodb/collection/batch/unordered.js:359:5
      

      It appears to be a bug in this.execute = function(_writeConcern, callback): there is no check on callback and it actually requires this parameter to be defined and call it as a function.

      Hope it helps!

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            mkalygin Michael Kalygin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: