Description
The sleep function in the Scripting Tool only works when used with the await keyword.
Steps to Reproduce
async function onRequest(context, url, request) {
console.log(url);
// This line will NOT delay execution
sleep(5000);
return request;
}
Current Behavior
- The sleep function only works correctly when prefixed with await.
Expected Behavior
- The sleep function should work as intended even without the await prefix.
Environment
- App Version: 3.4.0
- OS: Windows / Linux