Open
Description
In Internet Explorer 11 I get this error message when using the web components polyfill and lodash omitBy or pickBy.
Unable to get property '@@__�symbol:iterator0.93819982581614551' of undefined or null reference
This is not a duplicate of #43, though there are some similarities.
This has occurred with other polyfills as well:
- IE11 bug with Symbols and Enumerables exposed by lodash.omit polyfillpolyfill/polyfill-service#1058
- zloirock/core-js@7877078
Lodash similarly has blocked the issue on their end, I believe thinking that polyfills need to resolve the issue:
lodash/lodash#2308
Some interesting things about reproduction:
This one will fail with the above error:
<script src="https://unpkg.com/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min.js"></script>
<script>
var obj = {a: 1, b: 2}
var smaller = _.omitBy(obj, function (val) { return val > 1 })
console.log(smaller)
</script>
This one works fine:
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/2.4.3/custom-elements-es5-adapter.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min.js"></script>
<script>
var obj = {a: 1, b: 2}
var smaller = _.omitBy(obj, function (val) { return val > 1 })
console.log(smaller)
</script>
Does that just mean I'm using the wrong polyfill? My real use case is a complex webpack bundle thing with core-js and other, we first ran into #43 now this :)
You can see it for yourself here:
https://jsfiddle.net/s8yzcjne/3/embedded/result,css,html,js