Util.isObject fails

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Critical - P2
    • None
    • Affects Version/s: 2.0.37
    • Component/s: None
    • Environment:
      Windows 8
      Node 4.1.0
      Mongoose 4.1.7
      Mongodb: 2.0.42
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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

            Assignee:
            Christian Amor Kvalheim
            Reporter:
            Robert Polak
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: