@etsoo/smarterp-core 1.0.87 → 1.0.88

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.
@@ -34,7 +34,8 @@ var CoreUtils;
34
34
  */
35
35
  async function validateJson(schema, input) {
36
36
  if (ajv == null) {
37
- const AjvClass = (await import("ajv")).Ajv;
37
+ const AjvImport = await import("ajv");
38
+ const AjvClass = AjvImport.Ajv ?? AjvImport.default;
38
39
  ajv = new AjvClass({
39
40
  allErrors: true,
40
41
  strictTypes: false
@@ -28,7 +28,8 @@ export var CoreUtils;
28
28
  */
29
29
  async function validateJson(schema, input) {
30
30
  if (ajv == null) {
31
- const AjvClass = (await import("ajv")).Ajv;
31
+ const AjvImport = await import("ajv");
32
+ const AjvClass = AjvImport.Ajv ?? AjvImport.default;
32
33
  ajv = new AjvClass({
33
34
  allErrors: true,
34
35
  strictTypes: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/smarterp-core",
3
- "version": "1.0.87",
3
+ "version": "1.0.88",
4
4
  "description": "TypeScript APIs for SmartERP Core",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
package/src/CoreUtils.ts CHANGED
@@ -39,7 +39,8 @@ export namespace CoreUtils {
39
39
  ]
40
40
  > {
41
41
  if (ajv == null) {
42
- const AjvClass = (await import("ajv")).Ajv;
42
+ const AjvImport = await import("ajv");
43
+ const AjvClass = AjvImport.Ajv ?? AjvImport.default;
43
44
 
44
45
  ajv = new AjvClass({
45
46
  allErrors: true,