Encountered this one today which has me puzzled.
I have a js query using the async pattern:
(async () => {
const data1 = await jsTranslateRouteToLines.trigger()
const data2 = await qryUpdateRouteLines.trigger({additionalScope: {index: selFilterLeg.value, lines: data1}})
})();
jsTranslateRouteToLines
is also an async query that returns an object.
However, data1 is undefined.
jsTranslateRouteToLines
doesn't actually need to use the async pattern (I just default to that most of the time) so when I make it a plain js query, all is good in the world.
This is probably the result of some stuff under the hood of JS so probably over my head. But would like to understand it better. Or maybe I am just doing something wrong.