@openmrs/esm-form-engine-lib 2.1.0-pre.1524 → 2.1.0-pre.1526

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-form-engine-lib",
3
- "version": "2.1.0-pre.1524",
3
+ "version": "2.1.0-pre.1526",
4
4
  "description": "React Form Engine for O3",
5
5
  "browser": "dist/openmrs-esm-form-engine-lib.js",
6
6
  "main": "src/index.ts",
@@ -273,13 +273,15 @@ export class EncounterFormProcessor extends FormProcessor {
273
273
  }
274
274
  }),
275
275
  );
276
- fieldsWithCalculateExpressions.forEach(async (field) => {
277
- try {
278
- await evaluateCalculateExpression(field, initialValues, context);
279
- } catch (error) {
280
- console.error(error);
281
- }
282
- });
276
+ await Promise.all(
277
+ fieldsWithCalculateExpressions.map(async (field) => {
278
+ try {
279
+ await evaluateCalculateExpression(field, initialValues, context);
280
+ } catch (error) {
281
+ console.error(error);
282
+ }
283
+ }),
284
+ );
283
285
  }
284
286
  return initialValues;
285
287
  }