Skip to content

jQuery is converting params of the documentSubmit event to plain objects #39

@lukejagodzinski

Description

@lukejagodzinski

Let's take for example the documentSubmit event with all it's parameters:

Template.Form.events({
  documentSubmit(e, tmpl, doc) {
  }
});

If using the Astronomy package, we would expect the doc to be instance of our class, let's say an instance of the Post class. However:

Template.Form.events({
  documentSubmit(e, tmpl, doc) {
    if (doc instanceof Post) {
    }
  }
});

The instance check will return false. jQuery is transforming a document to plain objects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions