You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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#PolyfillUnfortunately this is an incomplete polyfill. In the spec it claims to be implementing, it is valid to pass an iterable (
Set
orMap
) 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.
The text was updated successfully, but these errors were encountered: