#Update to v5: can't do a map/sortBy on a PromiseManyArray anymore
1 messages · Page 1 of 1 (latest)
I tried to put it as sync but it's a failed 😅
~~PromiseManyArray says it's iterable, so you could probably use one of the native loops/iterators https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration~~
Looks like it has forEach (https://github.com/emberjs/data/blob/v5.3.0/packages/model/src/-private/promise-many-array.ts#L92)
I don't see any evidence of defining Symbol.iterator in the source code so probably not possible to iterate over other than it's own method
It’s iterable by templates. It’s not meant to be iterated by JS
those sound to me like the array prototype extensions which were deprecated a while back so not surprised they don't work in v5
is there any way I can fix these instances? Most of the hasMany relationships are async on our app and that has become a major blocker on our way to upgrading to v5.5.