UArm Studio 1.1.2 is running functions in parallel!

I made two functions, and I call them both, one after the other.

But it is actually calling both at the same time!

When I look at the javascript code, the code says:

await reset();
function1();
await function2();

It is missing the ‘await’ on the function1 call!

Any idea why or how to fix? I looked at the xml file, and I don’t see anything different between function1 and function2 that could cause this. I’ve deleted and recreated function1 with no change.

Oh, it seems that in the GUI, if I have the function declaration higher on the screen than the function call, then it correctly uses async. Otherwise it drops the async.

I guess it is evaluating from top to bottom, and is messing up when you call the function “before” it has been declared.