-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
🐞 Describe the Bug
When i hide a input field (checkbox...) i get the error Unhandled promise rejection Error: Invalid argument.
This error occures, when i add ember-cli-babel: { includePolyfill: true } in ember-cli-build.js (https://github.com/mkszepp/promise-bug-ie11/blob/82f5bf3c045a4dfc72eddf5a227158c80dfa55c9/ember-cli-build.js#L7-L9)
It looks like a polyfill (Symbol iterator) is not compatible with this code part (Line 193, because code 182 - 192 will be skipped in IE11 and modern browsers):
ember.js/packages/external-helpers/lib/external-helpers.js
Lines 180 to 195 in 744e536
| export function createForOfIteratorHelperLoose(o) { | |
| let i = 0; | |
| if (typeof Symbol === 'undefined' || o[Symbol.iterator] == null) { | |
| // Fallback for engines without symbol support | |
| if (Array.isArray(o) || (o = unsupportedIterableToArray(o))) | |
| return function () { | |
| if (i >= o.length) return { done: true }; | |
| return { done: false, value: o[i++] }; | |
| }; | |
| throw new TypeError( | |
| 'Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' | |
| ); | |
| } | |
| i = o[Symbol.iterator](); | |
| return i.next.bind(i); | |
| } |
The error occures also only, when jquery is completly removed/disabled in optional feature.
🔬 Minimal Reproduction
- Clone the repo
https://github.com/mkszepp/promise-bug-ie11or download build.zip and go to step 4 - Install packages
ember build --environment=production- Open build in IE11
- Click on "Toggle input" button
- Error
Unhandled promise rejection Error: Ungültiges Argument
🌍 Environment
- Ember: 3.28.11
- Node.js/npm: 14.18.3
- OS: Windows 10
- Browser: Internet Explorer 11
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
