Skip to content
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

Fix #2685. Removed for of statements #2714

Merged
merged 4 commits into from
Mar 7, 2018

Conversation

offtherailz
Copy link
Member

@offtherailz offtherailz commented Mar 7, 2018

Description

IE11 does not support for...of statements. I removed all of them. See notes below.

Issues

Please check if the PR fulfills these requirements

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

What is the new behavior?

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • No

Other information:
I didn't find a way in lint to skip for...of statements

  • ecmaFeatures.forOf doesn't seem to work
  • I found also ForOfStatement for entry no-restricted-syntax but probably belongs to a most recent version of eslint)
  • babel transform-es2015-for-of/ uses interable so is not usable too.
    So I wasn't able create a test or avoid future problems of this kind

@@ -164,7 +164,7 @@ const Api = {
},
updateResourcePermissions: function(resourceId, securityRules) {
let payload = "<SecurityRuleList>";
for (let rule of securityRules.SecurityRuleList.SecurityRule) {
(securityRules && securityRules.SecurityRuleList && _.castArray(securityRules.SecurityRuleList.SecurityRule) || []).forEach( rule => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use a reduce

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I didn't want to change this part not covered by a test. going to externalize SecurityRule and test it

@coveralls
Copy link

coveralls commented Mar 7, 2018

Coverage Status

Coverage increased (+0.04%) to 80.486% when pulling 83f93b0 on offtherailz:fix_#2685 into dece305 on geosolutions-it:master.

@ghost ghost removed the pending review label Mar 7, 2018
@offtherailz offtherailz merged commit 956845f into geosolutions-it:master Mar 7, 2018
@ghost ghost removed In Test review labels Mar 7, 2018
offtherailz added a commit that referenced this pull request Mar 7, 2018
offtherailz added a commit to offtherailz/MapStore2 that referenced this pull request Mar 12, 2018
@offtherailz offtherailz deleted the fix_#2685 branch May 26, 2020 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can not open certain maps with OpenLayers / IE11
3 participants