## Description Fixed the error of async function like `Api.run` being `undefined` after running `resetWidget`. #### Context:- we have 2 types of evaluation i.e., sync and async evaluation. These are dependent on the field we are evaluating, for the data field we use sync evaluation and for the trigger field, we use async evaluation. In Async evaluation, we also define entity functions like `Api.run`. - In resetWidget code, internally we were switching to sync evaluation and we forgot to add code to switch back to async and due to this code that was after it was throwing an `undefined` error. Fixes https://github.com/appsmithorg/appsmith/issues/33601 ### Steps to reproduce 1. Import user’s application ( shared on slack ) 2. Go to JSObj_Main JSObject 3. Check the onClickCopySheetTemplate function 4. Comment the await Qry_C_CopySheetTemplate.run(); line and run the function. 5. On release it will throw error for Qry_R_SheetTemplate.run(); not being defined but will work fine on DP. ## Automation /ok-to-test tags="@tag.JS" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/9170093222> > Commit: f9e8893d12cedbd9d2368cd9609bda7b86816588 > Cypress dashboard url: <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9170093222&attempt=1" target="_blank">Click here!</a> <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No |
||
|---|---|---|
| .. | ||
| client | ||
| server | ||
| util | ||