Skip to content

collection.import opts argument is not optional as informed in the documentation #27

@b-s-d

Description

@b-s-d

When calling collection.import(data, [opts,] callback) the opts argument is not being treated as optional as informed in the documentation.

For example, if you call import like:

collection.import([{name: 'abc'}], function(err){});

The following error is received on the callback:

[TypeError: Cannot read property 'type' of undefined]

My understanding is that the attribute opts.type is being expected in the implementation even when the opts is not being passed (see collection.js:189) :

ld: Boolean(opts.type !== 'array')

Metadata

Metadata

Assignees

Labels

BugA code defect that needs to be fixed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions