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

Util.isObject fails

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Works as Designed
    • Affects Version/s: 2.0.37
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows 8
      Node 4.1.0
      Mongoose 4.1.7
      Mongodb: 2.0.42

      Description

      I am trying to create index's using the mongose driver and getting a fatal error which is "no index name specified" I have tracked it down to where the field options are parsed to get an index name. When a check is done to see if the fieldSpec is an object it fails to correctly identify an object:

      var isObject = exports.isObject = function (arg)

      { return '[object Object]' == toString.call(arg) }

      when an object is passed I get "new" rather than '[object Object]'

      You can see this thread for more information : https://groups.google.com/forum/#!topic/mongoose-orm/PNfxia2ReoY

        Attachments

          Activity

            People

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            rob.polak@gmail.com Robert Polak
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: