emberjs / emberjs/ember-jquery

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

Open
#280 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
17
Forks
8
PR merge metrics
No merged PRs in 30d

Description

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](https://pragatheeswaranshf.github.io/ember-demos/) to reproduce this issue.

![selector-output](https://user-images.githubusercontent.com/46960095/88391111-23c50a80-cdd7-11ea-893b-660e8015d851.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.