Skip to content

Issue while destructuring this.$('.selector') in IE - 11 #280

@pragatheeswaranshf

Description

@pragatheeswaranshf

We have this code in one of our components

 const [element] = this.$('.test-selector');

This worked fine until we started adding @ember/jquery in our application. When using this addon, this piece of code crashes in IE-11 with the error

Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.

This is crashing only with IE - 11. Works when using the native jQuery provided by ember (without this addon). Any idea on what might be causing the issue with the addon? Here is a link to reproduce this issue.

selector-output

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