-
Notifications
You must be signed in to change notification settings - Fork 259
Description
The es5 build includes the Array.from polyfill for IE11 (and earlier) compatibility. The polyfill has been taken from MDN - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Polyfill
Unfortunately this is an incomplete polyfill. In the spec it claims to be implementing, it is valid to pass an iterable (Set or Map) to the function. The polyfill fails to handle them - returning an empty array.
As you add the polyfill, I can't do a simple if (!Array.from) check. I need to test the behaviour of the function to see if I have to overwrite it with a more compliant version. The alternative is I load the polyfills before any vendor libraries are added. Either way, I have some changes to make.
I appreciate you don't need to use Array.from(<iterable>) in JSONata, however we do in Node-RED. I just spent ages tracking down which of our dependencies was adding the polyfill before we did... and here we are.
This issue is mostly FYI - I'll leave it to you to decide if you want to add a more complete polyfill.