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

Error in render: "ReferenceError: 'Symbol' is undefined" when run on IE11 #93

Closed
dtsao opened this issue Dec 14, 2017 · 5 comments
Closed
Assignees
Labels

Comments

@dtsao
Copy link

dtsao commented Dec 14, 2017

Using the vue-webpack template 1.2.6 and portal-vue 1.2.1. My index.html has some complicated markup for the page header/footer including some navigation links. Vue is controlling a div in the middle of the page. I am using portal-vue to set the navigation links in the header based on some process.env variables from a config file so these can be customized for dev/qa/prod. This is working fine in Chrome and Firefox, but is failing in IE11. In IE11, the original contents of header div targeted by portal-vue is removed but is not being replaced by the portal content. The console is giving the following errors. How do I troubleshoot?

image

Thanks

@LinusBorg
Copy link
Owner

LinusBorg commented Dec 14, 2017

Hard to say without knowing any of your code.

Portal-vue doesn't use Symbols, so my first quest would be to find out where that 'Symbol' is coming from.

@dtsao
Copy link
Author

dtsao commented Dec 16, 2017

@LinusBorg, I created a simple project reproduces the error on 2 different Windows 10 PC running IE11 with node v6.11.5 or v8.9.3: https://github.com/dtsao/portal-vue-test-ie11

The error occurs when running using the webpack dev server and IE11, but goes away when running a production build.

My IE11 version:
image

Chrome:
image

IE11 - note that the portal-vue content is missing:
image

Console:
image

Step through exceptions to find the matching error:
image

image

image

etc.

On my full blown application, the error is in line 5 of: node_modules\core-js\library\modules_iter-detect.js
image

This may be relevant: babel/babel-preset-env#203

@LinusBorg
Copy link
Owner

LinusBorg commented Dec 17, 2017

Ah, I see. now I get it. The source for that passage is this:

export function combinePassengers (transports) {
  let passengers = []
  for (const transport of transports) {
    passengers = passengers.concat(transport.passengers)
  }
  return passengers
}

It was introduced with #80

the for ... of doesn't work without a polyfill. I'll change that to an ES5 counterpart.

@LinusBorg LinusBorg added the bug label Dec 17, 2017
@LinusBorg LinusBorg self-assigned this Dec 17, 2017
@LinusBorg
Copy link
Owner

LinusBorg commented Dec 17, 2017

See #94.

Just released v1.2.2 with that fix.

@dtsao
Copy link
Author

dtsao commented Dec 17, 2017

Great - thank you for the fix!

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

No branches or pull requests

2 participants