Wildhoney/EmberDroplet

Array.from() is not a function

Closed this issue · 5 comments

I am returning a record from the api after image upload... because I am not returning an array, EmberDroplet is trying to create one. In Chrome, and I am sure many other browsers at this point, Array.from() does not exist... Any suggestion as to what to do here?

Ended up loading the shim to support Array.from(). Seems very heavy handed for a lib to require this for one line of code but OK.

Sorry @lardawge I forgot to respond to this issue. Agreed its overkill, and I thought I'd added a check for Array.from before using it. Will look into it tomorrow and push a fix.

Thanks @Wildhoney

I am looking into another issue that I am trying to solve related to hooks being overwritten. I believe it is an issue that effects options as well... will open an PR if I can get my head around it.

Options issue is likely to be related to the following issue: #91 which is another priority fix 👍

I've just pushed the change for Array.from as v1.0.1 so please verify and close this issue if it's fixed – I'm going to surmise you — for some reason — have Array.from defined, but it's not the native in-built function but a string or some other data type, which is why the validation was failing.

If the options issue you're investigating is related to #91 then please continue discussion there, otherwise open another ticket.

Thanks @lardawge ! And sorry for forgetting to update this ticket before.

Yes, fixed. Thanks for that!