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

Problems with rest parameter on IE11 #59

Closed
mojoaxel opened this issue Sep 15, 2019 · 8 comments
Closed

Problems with rest parameter on IE11 #59

mojoaxel opened this issue Sep 15, 2019 · 8 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@mojoaxel
Copy link
Member

I got an error debugging visjs/vis-timeline#72 on IE11.
There seams to be a problem in the selectiveExtend function.

It looks to me that the babel transform of the rest parameter "others" is buggy:
image

I cannot get this function run in IE without an error 😭

@mojoaxel mojoaxel added bug Something isn't working help wanted Extra attention is needed labels Sep 15, 2019
@mojoaxel mojoaxel changed the title Problems with IE11 Problems with rest parameter on IE11 Sep 15, 2019
@Thomaash
Copy link
Member

Vis Timeline uses Vis Util 1.1.4. Does it happen with 1.1.8?

@mojoaxel
Copy link
Member Author

Vis Timeline uses Vis Util 1.1.4. Does it happen with 1.1.8?

I'm working with the current master branch of vis-util.

@Thomaash
Copy link
Member

Hmm, I don't see any spreading being done in the function.

@mojoaxel
Copy link
Member Author

Hmm, I don't see any spreading being done in the function.

It's the "rest parameter" others:
https://github.com/visjs/vis-util/blob/master/src/util.ts#L249

@Thomaash
Copy link
Member

But that's not spreading (it just uses the same symbol). Atop of that this gets transformed into a for loop which also doesn't use any spreading.

@Thomaash
Copy link
Member

In the bundle you have:

for (var _len = arguments.length, others = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
  others[_key - 2] = arguments[_key];
}

@mojoaxel
Copy link
Member Author

You are right...I don't know anymore..I give up!
Maybe It's time that you get yourself a virtual machine with IE11 😉

The timeline is still broken on IE11 (see visjs/vis-timeline#72) and I really want to fix this before releasing vis-timeline@6

@yotamberk
Copy link
Member

Seems to work for me on IE11 now on latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants