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

observe-sequence@1.0.18 syntax broken on IE 11 #347

Closed
dougfabris opened this issue Jul 2, 2021 · 5 comments · Fixed by #348
Closed

observe-sequence@1.0.18 syntax broken on IE 11 #347

dougfabris opened this issue Jul 2, 2021 · 5 comments · Fixed by #348
Assignees
Labels

Comments

@dougfabris
Copy link

dougfabris commented Jul 2, 2021

Recently we updated the meteor version e we realize the observe-sequence@1.0.18 is broken on Internet Explorer 11

We believe is something related to the syntax, not supported, present here: https://github.com/meteor/blaze/blob/master/packages/observe-sequence/observe_sequence.js#L170

As a workaround, we are doing a downgrade to the v1.0.16: RocketChat/Rocket.Chat#22557
We hope you guys can have a fix for that soon, thanks!

@StorytellerCZ
Copy link
Collaborator

Confirmed, for-of loop is not compatible with IE at all. I'll get a fix out today.

@StorytellerCZ StorytellerCZ self-assigned this Jul 3, 2021
@StorytellerCZ
Copy link
Collaborator

ping @antoinep92 who implemented this originally.

@StorytellerCZ StorytellerCZ linked a pull request Jul 3, 2021 that will close this issue
@antoinep92
Copy link
Contributor

antoinep92 commented Jul 6, 2021

Sorry about that.
@StorytellerCZ you just downgraded or did you fix the implem (loop) ? If not, I can fix by tomorrow max.

@antoinep92
Copy link
Contributor

antoinep92 commented Jul 6, 2021

Hum ok I saw your fix. Indeed it should work in IE, but breaks my code for non-array iterables.
e.g. toDebugStr(new Set([1,2,3]) returns "Set []".
I thought about using Array.from but that's not supported either.
Is there some kind of library you use that provides a polyfill or equivalent to Array.from, or should I implement it "by hand" (that would be a lot simpler than the proposed polyfill on MDN's page, because we only need to handle one special case) ? 🤔

@antoinep92
Copy link
Contributor

After giving this some more thought: I can use Array.from safely, since it won't trigger a parse error in IE 11 (as for .. in did) and iterables aren't supported on IE either, so the branch with Array.from will be unreachable in IE. I'll submit a PR shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants