Skip to content

Fix IE11 error - SCRIPT438: Object doesn't support property or method 'forEach' #1255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 6, 2020

Conversation

shaal
Copy link
Contributor

@shaal shaal commented Sep 1, 2020

Running PL 5.13.0 on Internet Explorer 11, and I am getting this error.
SCRIPT438: Object doesn't support property or method 'forEach'

Summary of changes:
When this class is not in a page '.pl-js-pattern-extra-toggle', the array is empty, and forEach throw an error.
Checking that the array is not empty before running forEach function.

@shaal shaal requested a review from sghoweri as a code owner September 1, 2020 04:26
@JosefBredereck
Copy link
Contributor

JosefBredereck commented Sep 2, 2020

I would love to see pattern lab running in IE11. I had some issues with that for a customer.

@sghoweri
Copy link
Contributor

sghoweri commented Sep 2, 2020 via email

@JosefBredereck
Copy link
Contributor

Sorry that I highjacked this PR but there was much more to do then just adding an if.
I also remove unused code in this case and uninstalled packages that are not in use anymore.

@shaal
Copy link
Contributor Author

shaal commented Sep 4, 2020

@JosefBredereck @ringods with the new syntax of the for loop, the if statement above it should be removed.
I wish I knew how to download this code, and test it myself (as oppose to adding PL official packages in package.json file)

@JosefBredereck JosefBredereck requested review from sghoweri and removed request for sghoweri September 4, 2020 21:16
@JosefBredereck JosefBredereck removed the request for review from sghoweri September 6, 2020 12:31
@JosefBredereck
Copy link
Contributor

I just tested all changes; with the production source, we had so many problems in the past. Everything works fine in IE11 now. I will merge now.

@JosefBredereck
Copy link
Contributor

Released with v5.13.1

antonia-rose pushed a commit to quelltexterin/nemo-uikit-workshop that referenced this pull request Apr 12, 2023
* Fix IE11 error - SCRIPT438: Object doesn't support property or method 'forEach'
* Update uikit polyfills to run pl in ie11
* Update packages/uikit-workshop/src/scripts/components/modal-styleguide.js
* Update modal-styleguide.js

Co-authored-by: Ofer Shaal <ofer@3paces.com> Josef Bredreck <slime.games@outlook.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants